Description
Use this function to return the sum of values supplied. Supported in Chains. Can be used with CHILDREFS.
Syntax
SUM(number, […, number_254])
Inputs
This function accepts the following arguments:
| Name | Required | Description | Valid input |
|---|---|---|---|
number_1 |
Yes | The first number to be added. | A cell reference, a number, or a formula which results in either of these. |
number_n |
No | Additional numbers to be added. | A cell reference (including a range), a number, or a formula which results in either of these. |
Examples
Sample data
| A | B | |
|---|---|---|
| 1 | 51 | 57 |
| 2 | 93 | 45 |
| 3 | egg | 15 |
| 4 | 19 | 92 |
| 5 | 75 | 22 |
Sample formulas
| Use case | Formula | Explanation and Result |
|---|---|---|
| Add up all the values in a single column of numbers. | =SUM(B1:B5) |
Adds every value in B1:B5 (57, 45, 15, 92, 22). Result: 231 |
| Add up a range that contains some non-numeric text. | =SUM(A1:A5) |
Adds 51, 93, 19, and 75 from A1:A5; the text "egg" in A3 is treated as 0 rather than causing an error. Result: 238 |
| Combine totals from two separate ranges into one sum. | =SUM(A1:A5, B1:B5) |
Adds every value across both A1:A5 and B1:B5 in a single formula, again treating "egg" as 0. Result: 469 |
| Add specific cell values together with a number typed directly into the formula. | =SUM(A2, 100, B4) |
Adds the value in A2 (93), the literal number 100, and the value in B4 (92). Result: 285 |
| See what happens when you try to sum text typed directly into the formula, rather than referenced from a cell. | =SUM("egg", 10) |
Text entered directly in quotation marks can't be summed like a cell reference can, so the formula returns an error instead of treating it as 0. Result: #VALUE! |
Notes
- SUM automatically ignores empty cells.
- If text is included by a cell or range reference, then it is treated as a zero.
- If text is included without quotation marks, the function returns a #NAME! error. If text is included with quotation marks, the function returns a #VALUE! error.
- If arguments contain errors, SUM will return an error.
- SUM can handle up to 255 total arguments.
- Wildcards don't work with this function.
Tips
TBD
Related functions
ABS
EXP
LN
MOD
N
POWER
PRODUCT
SIGN
SQRT
SUBTOTAL
SUMIF
SUMIFS
SUMPRODUCT