[]
This function returns the sum of cells or range of cells.
SUM(number1,[number2],...)
This function has these arguments:
Argument | Description |
|---|---|
number1 | [Required] The first number you want to add. The number can be like 4, a cell reference like B6, or a cell range like B2:B8. |
[number2],... | [Optional] This is the second number you want to add. You can specify up to 255 numbers in this way. |
Range references with mixed relativeness for column or row endpoints are not supported with the SUM function. R1C[1]:R2C[2] is okay but, R1C1:R2C[2] is not.
The SUM function ignores non-numeric values passed by reference. For example, if A1 contains TRUE, A2 contains "2", and A3 contains 4, then:
TRUE+"2"+4 evaluates to 7
A1+A2+A3 evaluates to 7
SUM(TRUE,"2",4) evaluates to 7
SUM(A1,A2,A3) evaluates to 4
The + operator provides an auto-conversion for non-numeric values passed by constant and for non-numeric values passed by reference. The SUM function provides an auto-conversion for non-numeric values passed by constant but, ignores non-numeric values passed by reference.
SUM(A1,B7,C11)
SUM(A1:A9)
SUM(A2:A14,B2:B18,D12:D30)
SUM(R1C2,R3C5,R6C2,R1C7)
SUM(95,89,73,87,85,76,100,96,96) gives the result 797