Example 1
Total a column
B7 =SUM(B2:B6)
Result: 3000
One range, five cells. Adding a sixth expense inside the range updates the total.
B7 =SUM(B2:B6) returns 3000
Adds numbers, cells and ranges. Text and TRUE/FALSE inside a range are ignored.
Syntax
=SUM(, [number2], …)
All versions of Excel.
Try it
Edit the formula in B7 or change the inputs. The sheet recalculates as you type.
B7 =SUM(B2:B6) returns 3000
SUM adds up everything you give it. It is the most used function in Excel, and the one to reach for whenever a column of figures needs a total.
Each argument can be a single number, a cell reference or a range. SUM adds every number it finds and skips the rest. Inside a range or a cell reference, text, TRUE/FALSE and empty cells are ignored. That is why a header row or a note in the middle of a column doesn't break the total.
Values typed straight into the formula are treated differently. =SUM("30", 10) returns 40, because Excel converts the typed text "30" to a number, and =SUM(TRUE, 1) returns 2. A cell that contains the text "30" is a different case: SUM ignores it. This is the usual reason a total comes out lower than expected, so check for numbers stored as text.
A range can be a column, a row or a block. =SUM(B2:C9) adds both columns. To add separate areas, list them: =SUM(B2:B9, D2:D9). Whole-column references such as =SUM(B:B) also work and keep covering new rows as you add them, but they must not include the cell that holds the formula, or Excel reports a circular reference.
If any cell in the range holds an error such as #N/A or #DIV/0!, SUM returns that error. Fix the source cell, or use AGGREGATE with option 6 to total the numbers and skip the errors.
=B2+B3+B4 gives the same answer for three cells, but it errors if one of them contains text, and it doesn't grow when you insert a row inside the range. SUM does both. The AutoSum button (Alt+= on Windows) writes a SUM formula for you and guesses the range, so check the range it picks.
Each of these costs one function name more than SUM, so use plain SUM when you want everything in the range.
B2, or a range such as B2:B9.=SUM(B2:B9, D2:D9, 100).Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B7 =SUM(B2:B6)
Result: 3000
One range, five cells. Adding a sixth expense inside the range updates the total.
B7 =SUM(B2:B6) returns 3000
Example 2
B6 =SUM(B2:C4)
Result: 736
A range can be several columns wide. SUM adds all six cells.
B6 =SUM(B2:C4) returns 736
Example 3
C1 =SUM(A1:A5)
Result: 70
A3 holds the text "30" and A4 holds TRUE. SUM skips both and adds 10 + 20 + 40.
C1 =SUM(A1:A5) returns 70
Example 4
C4 =SUM($B$2:B4)
Result: 1245
The start of the range is locked with dollar signs and the end is relative. Copied down, each row totals everything from January to its own month.
C4 =SUM($B$2:B4) returns 1245
Example 5
C2 =B2/SUM($B$2:$B$6)
Result: 60%
SUM supplies the denominator. The dollar signs keep the range fixed when the formula is copied down.
C2 =B2/SUM($B$2:$B$6) returns 60%
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In B9, total the net amounts for all six lines.
Answer in B9.
#N/A, SUM returns that error. Fix the source, or use AGGREGATE(9, 6, range) to skip errors.SUBTOTAL(109, range) instead.=SUM(B2:B9) in B10, not B9.The cells probably hold text that looks like numbers. SUM ignores text in a range. Check for left-aligned values or a green triangle, then convert them with VALUE or Text to Columns.
`=B2+B3` adds two cells and returns `#VALUE!` if one holds text. `=SUM(B2:B3)` skips text and adjusts when you insert a row inside the range. Use SUM for ranges.
Use SUMIF for one condition and SUMIFS for several, for example `=SUMIFS(C2:C9, A2:A9, "North")`. For visible rows after a filter, use SUBTOTAL.
Up to 255, each a number, cell or range. A single range can be as large as the sheet, so you rarely need more than a few arguments.
Select the cell under or beside the numbers and press Alt+= on Windows, or Cmd+Shift+T on Mac. Excel inserts a SUM formula with its guess at the range.
SUM is taught in Excel foundations, lesson 5: SUM and ranges. Each lesson is a short, graded exercise like the one above.