SUM Function
Purpose
Adds all numbers in a range of cells, individual numbers, cell references, or mathematical expressions.
Syntax
EXCEL
=SUM(number1, [number2], ...)
Arguments Breakdown
| Argument | Required? | Description |
|---|---|---|
number1 |
Required | The first number, cell reference, or cell range to sum (e.g., A1:A10). |
number2, ... |
Optional | Additional numbers, cell references, or ranges (up to 255 arguments). |
Practical Examples
1. Simple Range Sum
EXCEL
=SUM(B2:B50)
2. Adjacent Cell Expression (Direct Arithmetic)
EXCEL
=SUM(B3+A3)
3. Multi-Range Sum
EXCEL
=SUM(Q1_Sales, Q2_Sales, Q3_Sales, Q4_Sales)
Behavior & Gotchas
- Text & Blanks: Text strings, empty cells, and boolean values (
TRUE/FALSE) in referenced ranges are ignored. - Hardcoded Text Arguments: If you pass a text representation of a number directly as an argument like
=SUM("5", 10), Excel will coerce it to a number (15). But if cellA1contains"5"as text,=SUM(A1, 10)returns10. - Error Propagation: Any error value (
#VALUE!,#N/A,#DIV/0!) in the range causes=SUM()to return that error. UseAGGREGATEorSUM(IFERROR(...))to bypass errors.
Related Knowledge
- Notes: 02 Statistical and Aggregation Functions
- Workbook:
11_Demos_and_Workbooks/03_Formulas_and_Functions/Formulas_&_Functions_Part_1.xlsx(Sheet:Arithmetic and statistical)