SUM

SUM(number1 [,number2] [..])

Returns the total value of the numbers in a list, table or cell range.

number1The first number.
number2(Optional) The second number.

REMARKS
* This function includes hidden cells.
* For an illustrated example refer to the page under Advanced Functions
* Arguments that are numbers are included.
* Arguments that are numbers passed as text ("3") are included. (Row 15)
* Arguments that are dates are included and the date serial number will be used. (Row 12)
* Arguments that are cell references to cells containing logical values are excluded. (Row 11)
* Arguments that are arrays containing logical values are excluded. (Row 20)
* Arguments that are just logical values are included. (Row 18)
* Arguments that are cell references to cells containing text are excluded. (Row 10)
* Arguments that are arrays containing text are excluded. (Row 17)
* Arguments that are just text will generate a #VALUE! error. (Row 16)
* If any cell references are empty, then these are excluded. (Row 8)
* If any cell references contain an error, then that error is returned. (Row 14)
* You can have a maximum of 255 arguments.
* To sum all the values in column "C" use: "=SUM(C:C)". This function automatically finds the last used row in a column reference.
* There is also an AutoSum button to help you enter this function quickly.
* You can use the SUMIFS function to satisfy multiple conditions.
* You can use the SUMPRODUCT function to return the sum of the product of one or more arrays of values.
* You can use the SUMSQ function to return the sum of the squares of all the values in a list, table or cell range.
* You can use the AGGREGATE function to exclude hidden cells.
* You can use the SUMFORMAT to return the sum of all the values that have been formatted with multiple attributes.
* You can use the SUMVISIBLE - User Defined Function to exclude hidden cells.
* This is similar to the AVERAGE, COUNT, MAX and MIN functions.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=SUM(2,4) = 65
2=SUM(5,10,15) = 3010
3=SUM(5,10,15,0) = 3015
4=SUM(-2,-3,4,5,6) = 10 
5=SUM({-2,-3,4,5,6}) = 100
6=SUM(B1:B3) = 30text
7=SUM(B1,B2,B3) = 30FALSE
8=SUM(B1,B2,B3,B4) = 30=DATE(2023,1,1) = 01 Jan 2023
9=SUM(B1,B2,B3,B5) = 30=10/0 = #DIV/0!
10=SUM(B1,B2,B3,B6) = 30 
11=SUM(B1,B2,B3,B7) = 30 
12=SUM(B1,B2,B3,B8) = 44957 
13=SUM(named_range) = 30 
14=SUM(B5,B6,B9) = #DIV/0! 
15=SUM(2,"3") = 5 
16=SUM(2,"some text") = #VALUE! 
17=SUM({2,"some text"}) = 2 
18=SUM(2,TRUE) = 3 
19=SUM(2,FALSE) = 2 
20=SUM({2,TRUE}) = 2 

1 - What is the sum of 2 and 4.
2 - What is the sum of 5, 10 and 15.
3 - What is the sum of 5, 10, 15 and 0. Zeros are always included.
4 - What is the sum of -2, -3, 4, 5 and 6.
5 - What is the sum of the values in the array (-2, -3, 4, 5, 6).
6 - What is the sum of the values in range "B1:B3".
7 - What is the sum of the values in range "B1", "B2" and "B3".
8 - What is the sum of the values in range "B1", "B2", "B3" and "B4". B4 is empty. Empty cells are always excluded.
9 - What is the sum of the values in range "B1", "B2", "B3" and "B5". B5 is zero so this gets included.
10 - What is the sum of the values in range "B1", "B2", "B3" and "B6". B6 is text so this gets excluded.
11 - What is the sum of the values in range "B1", "B2", "B3" and "B7". B7 is a logical value so this gets excluded.
12 - What is the sum of the values in range "B1", "B2", "B3" and "B8". B8 is a date so this gets included as a date serial number.
13 - What is the sum of the values in the named range that refers to the range "B1:B3".
14 - What is the sum of the values in range "B5", "B6" and "B9". B9 contains an error so that gets returned.
15 - What is the sum of 2 and "2". Text values that are actually numbers are included.
16 - What is the sum of 2 and "some text". Text values passed as arguments are excluded.
17 - What is the sum of the values in the array (2, "some text"). Text values inside arrays are excluded.
18 - What is the sum of 2 and TRUE. Logical values passed as arguments are included.
19 - What is the sum of 2 and FALSE. Logical values passed as arguments are excluded.
20 - What is the sum of the values in the array (2, TRUE). Logical values inside arrays are excluded.

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited Top