Adding up with SUM
If one cell in a column holds the text n/a, =B2+B3+B4 shows #VALUE!, while =SUM(B2:B4) skips the text and adds the rest.
Your first function
A function is a named calculation that takes inputs in brackets. SUM adds numbers. Its inputs, called arguments, can be numbers, cell references, ranges or any mix: =SUM(4,6), =SUM(B2:B13) and =SUM(B2:B13,D2) all work. Commas separate the arguments. Microsoft's page says Excel's SUM takes up to 255 of them, and Google's help says Sheets accepts any number. In practice one or two ranges are enough, because a single range can cover thousands of cells.
Writing =B2+B3+B4+B5+B6 gives the same total as =SUM(B2:B6) when every cell holds a number, but Microsoft lists reasons to prefer SUM. The long version is easy to mistype. It breaks with #VALUE! if any of the cells holds text, because + must turn every piece into a number and cannot turn n/a into one. SUM ignores text values in a range and adds only the numbers. And when you insert a row inside the range, SUM grows to include it, while a chain of + signs does not.
Skipping text is helpful and dangerous at the same time. If a figure was typed as text by mistake, such as a number pasted with a stray space or apostrophe, SUM leaves it out without any warning and the total is simply too small. The left alignment from the previous unit is the clue to look for, and the lab's panel shows the kind of every value a formula used.
Colons and commas
The colon and the comma do different jobs. B2:B6 means every cell from B2 to B6, five cells. B2,B6 means just those two cells. Microsoft calls them the range operator and the union operator. So =SUM(B2:B3,B6) adds three cells, B2, B3 and B6. One more detail: in some languages and regions the comma is used as the decimal mark, and there the spreadsheet expects semicolons between arguments, as in =SUM(B2:B3;B6). The rule is the same, only the separator changes.
Both programs have a sum button marked with the Greek letter Σ. In Excel it is AutoSum on the Home tab; in Google Sheets it is in the Functions menu on the toolbar. Select the cell under a column of numbers, press it, and the program proposes a range. Check the proposed range before pressing Enter, because it stops at the first empty cell or label it meets. Selecting a block of numbers also shows their sum at the bottom of the window, which is handy for a quick look without writing anything.
A good habit is to keep totals out of the range they add up. If the total for B2:B6 sits in B7 and the formula is =SUM(B2:B7), it includes itself, which is a circular reference and produces an error or a warning. Put a label such as Total in the cell to the left of the result so readers know what the number is, and leave the column of figures with nothing but figures in it. Then both SUM and anyone reading the sheet can trust the column.
Drag to turn. Scroll or pinch to zoom.
- B2:B6 holds 120, 95, the text n/a, 130 and 110. What does =SUM(B2:B6) return?
- Same cells. What does =B2+B3+B4+B5+B6 return?
- #VALUE!
- 455
- 0
- #NAME?
- How many cells does =SUM(B2:B3,B6) add?
- With 120, 95 and 110 in B2, B3 and B6, what does =SUM(B2:B3,B6) return?
- What does =SUM(4,6,10) return?
- How many numbers can Excel's SUM take as separate arguments?
- What does the colon in B2:B6 mean?
- Every cell from B2 to B6
- Only B2 and B6
- B2 divided by B6
- B2 or B6, whichever is larger
- A price was pasted as text by mistake. What does SUM do with it?
- Leaves it out without warning
- Shows #VALUE!
- Counts it as 1
- Converts it and adds it
- In regions that use a comma as the decimal mark, how are SUM arguments separated?
- Semicolons
- Colons
- Spaces
- Slashes
- A1:A4 holds 2, 4, 6 and 8. What does =SUM(A1:A4)/4 return?
- =SUM(range) adds the numbers in a range and skips text.
- A chain of + signs breaks with #VALUE! when a cell holds text.
- Colon = range, comma = separate pieces.
- Excel SUM takes up to 255 arguments; Google Sheets has no fixed limit.
Sources for this course (2)
- Microsoft Support, "Excel specifications and limits" (support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3: 1,048,576 rows by 16,384 columns, 15-digit precision, 255 arguments), "Calculation operators and precedence in Excel" (.../calculation-operators-and-precedence-in-excel-48be406d-4975-4d31-b2b8-7af9e0e2878a: operators, order negation % ^ * / + - & comparisons, =5+2*3 is 11, ="1"+"2" is 3, ="A"&TRUE is ATRUE, #### for too little space), "SUM function" (.../sum-function-043e1c7d-7726-4e80-8f32-07b23e057f89: up to 255 numbers, =A1+B1+C1 gives #VALUE! with text while SUM ignores text), "Switch between relative, absolute, and mixed references" (.../dfec08cd-ae65-4f56-839e-5f0d8d0baca9: =B4*C4 copied from D4 to D5 becomes =B5*C5), "Date systems in Excel" (.../e7fe7167-48a9-4b96-bb53-5612a800b487: July 5, 2011 is 40729 in the 1900 system and 39267 in the 1904 system, 1,462 days apart), "Remove or allow a circular reference" (.../8540bd0f-6e97-4483-bcf7-1b49cd50d123: warning, then 0 or the last value), VLOOKUP and IF pages (#N/A, #NAME? from missing quotes). Google Docs Editors Help: SUM (support.google.com/docs/answer/3093669: any number of arguments), DATE (answer/3092969: days counted from December 30, 1899), Keyboard shortcuts for Google Sheets (answer/181110: Ctrl+D fill down, Ctrl+R fill right, Ctrl+~ show all formulas, F4 absolute/relative), Files you can store in Google Drive (support.google.com/drive/answer/37603: up to 20 million cells per spreadsheet), ERROR.TYPE (answer/3238305: the error values). History: Smithsonian National Museum of American History, VisiCalc software and documentation, object nmah_1696121 (Bricklin and Frankston, Apple II, 1979)
- ACM Interactions, "The first killer app: a history of spreadsheets" (2013: Lotus 1-2-3, Excel for the Macintosh in 1985)
Checked: 2026-10-17