# SUM

Adds all the numbers in a range of cells.

**Syntax**

**SUM**(**number1**,number2, ...)

**Number1**,number2, ... are 1 to 30 arguments for which you want the total value or sum.

- Numbers, logical values, and text representations of numbers that you type directly into the list of arguments are counted. See the first and second examples following.
- If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored. See the third example following.
- Arguments that are error values or text that cannot be translated into numbers cause errors.

**Examples**

`SUM(3, 2)`

equals 5

`SUM("3", 2, TRUE)`

equals 6 because the text values are translated into numbers, and the logical value TRUE is translated into the number 1.

Unlike the previous example, if A1 contains "3" and B1 contains TRUE, then:

`SUM(A1, B1, 2)`

equals 2 because references to nonnumeric values in references are not translated.

If cells A2:E2 contain 5, 15, 30, 40, and 50:

`SUM(A2:C2)`

equals 50

`SUM(B2:E2, 15)`

equals 150