Skip to content

Lesson 10 of 92 · Free Excel Course

Excel

Excel SUM Formula: How to Total a Column, a Row or Several Sheets

How to use the Excel SUM formula and AutoSum to total a column or row, add cells that aren't next to each other, sum across sheets and fix a wrong total.

Adding things up is the job most people open Excel for: this month's bills, a column of sales, hours worked. In the last lesson you added four cells with =D2+D3+D4+D5. That's fine for four cells but painful for forty. The SUM function adds a whole block of cells in one short formula, and the AutoSum button writes that formula for you in one click. This lesson shows how to total a column, a row, scattered cells and even several sheets, plus how to spot the one problem that makes SUM give the wrong answer.

What the SUM formula looks like

A function is a ready-made formula with a name. SUM's job is to add. It looks like this:

=SUM(B2:B6)

Read it as "add up everything from B2 to B6". The parts are:

  • = starts the formula, as always.
  • SUM is the function name.
  • ( ) brackets hold what you want added.
  • B2:B6 is a range: the colon means "from B2 to B6", so it covers B2, B3, B4, B5 and B6.

You can put more than one thing inside the brackets, separated by commas: =SUM(B2:B6, D2:D6) adds two ranges, and =SUM(B2, B5, 100) adds two cells and the number 100. Excel accepts up to 255 of these items, which you will never run out of.

Total a column with AutoSum

Here is a simple list of monthly bills in column B. Let Excel write the formula.

  1. Click B7, the empty cell directly below the last number.
  2. On the Home tab, click AutoSum (the Greek sigma symbol, Σ, near the right end of the ribbon). It's also on the Formulas tab. Or press Alt+= (hold Alt and tap the equals key).
  3. Excel types =SUM(B2:B6) and draws a moving dotted border around B2 to B6. Check that border. If it covers the wrong cells, drag over the right ones now.
  4. Press Enter.
B7=SUM(B2:B6)
AB
1BillAmount
2Rent$1,200.00
3Phone$65.00
4Groceries$430.00
5Electric$95.00
6Internet$60.00
7Total$1,850.00
AutoSum in B7 picked B2:B6. The total of the five bills is $1,850.00.

On a Mac, the shortcut is Shift+Cmd+T, and press Return instead of Enter. In Excel for the web, click AutoSum on the Home tab; the steps are the same. AutoSum guesses the range from the numbers next to the cell, so a blank row or a stray heading in the middle of your list can make it pick too few cells. That's why step 3 matters.

Type a SUM formula yourself

AutoSum is quick, but typing the formula is just as easy and works anywhere, even far from the data.

  1. Click the cell where you want the total.
  2. Type =SUM(. Excel shows a small tip underneath: SUM(number1, [number2], ...).
  3. Drag over the cells you want to add, such as B2 to B6. Excel writes B2:B6 for you.
  4. Type ) and press Enter.

You can also type the whole thing, =sum(b2:b6), in lower case. Excel tidies it into capitals. To total an entire column, including rows you add later, use =SUM(B:B). Just don't put that formula inside column B itself, or Excel will warn you about a circular reference (a formula that includes its own cell).

Total a row

Totals work sideways too. Click the cell to the right of a row of numbers and use AutoSum.

  1. Click E10, the empty cell after the March number.
  2. Press Alt+= or click AutoSum.
  3. Excel picks B10:D10. Check it, then press Enter.
E10=SUM(B10:D10)
ABCDE
9Coffee shopJanFebMarTotal
10Sales$1,200.00$1,350.00$980.00$3,530.00
AutoSum to the right of a row adds across it: 1,200 + 1,350 + 980 = 3,530.

If there are numbers both above and to the left of the cell, AutoSum usually prefers the column above. Always look at the dotted border before pressing Enter. You can also use AutoSum on more than one cell at a time: select the empty cells under two or three columns, click AutoSum, and each column gets its own total.

Add cells that aren't next to each other

Sometimes you want to skip a few rows. Say you want every bill except Groceries. AutoSum can't guess that, so type it:

  1. Click the cell for the answer and type =SUM(.
  2. Drag over B2:B3 (Rent and Phone).
  3. Hold Ctrl (Cmd on a Mac) and drag over B5:B6 (Electric and Internet).
  4. Type ) and press Enter.

The formula is =SUM(B2:B3,B5:B6) and the answer is $1,420.00: 1,200 + 65 + 95 + 60. The comma is what separates the pieces, so you can also type it by hand.

SUM across sheets

If you keep one sheet per month, as in Workbooks and sheets, you'll want a total of the same cell on each one. There are two ways.

Method 1: add them with +. On a Summary sheet, type =Jan!B2+Feb!B2+Mar!B2. The exclamation mark separates the sheet name from the cell. The quickest way to build it is to type =, click the Jan tab, click B2, type +, click the Feb tab, click B2, and so on, then press Enter.

Method 2: a 3-D reference. Type =SUM(Jan:Mar!B2). This adds B2 on every sheet from Jan to Mar in the order the tabs appear. To build it by clicking:

  1. On the Summary sheet, click the cell for the answer and type =SUM(.
  2. Click the Jan tab.
  3. Hold Shift and click the Mar tab.
  4. Click B2, type ) and press Enter.
B2=SUM(Jan:Mar!B2)
AB
1Coffee salesTotal
2Jan to Mar$1,315.00
JanFebMarSummary
Jan B2 is $420, Feb B2 is $385 and Mar B2 is $510, so the 3-D SUM gives $1,315.00.

The 3-D version is shorter and picks up any new sheet you drag between Jan and Mar. The catch is the same thing: tab order counts, so moving a sheet outside that span silently drops it from the total. If a sheet name has a space, put single quotes around the names, like =SUM('Week 1:Week 4'!B2). Method 1 works in every version of Excel, including Excel for the web, so use it if the 3-D one ever gives you trouble.

Why SUM ignores text (and your total is too low)

SUM only adds real numbers. If a cell holds text, SUM skips it, which is usually helpful: a header like "Amount" inside your range won't break anything. The trouble is a number that only looks like a number but is stored as text. This happens a lot with data pasted from a website, a PDF or another program.

B20=SUM(B15:B19)
AB
14Text trapAmount
15Rent$1,200.00
16Phone$65.00
17Groceries430
18Electric$95.00
19Internet$60.00
20Total$1,420.00
B17 holds 430 as text. It sits on the left with no $ format, and SUM skips it: the total is $430 short.

How to spot it: the number sits on the left of the cell (real numbers line up on the right), it ignores the currency format, and Excel puts a small green triangle in the top-left corner. To fix it on Windows or Mac:

  1. Select the cell (or all the problem cells).
  2. Click the yellow warning icon that appears beside it.
  3. Choose Convert to Number.

The total updates straight away to the right $1,850.00. In Excel for the web, Microsoft's suggested fix is the VALUE function: in a spare cell type =VALUE(B17), then copy the result and paste it back as a value. If a whole column came in as text, check its number format first, as covered in Format cells.

This is also why SUM beats the plus sign. =B15+B16+B17 would show #VALUE! if B17 held a word, while SUM just carries on. SUM also adjusts itself when you insert or delete rows inside its range; a long chain of + doesn't.

Quick total in the status bar

You don't always need a formula. Select some numbers and look at the status bar, the thin strip along the bottom of the Excel window. By default it shows Average, Count and Sum for whatever you've selected. Select B2 to B6 in the bills list and it reads Sum: $1,850.00.

Right-click the status bar to choose what it shows; you can add Minimum, Maximum and Numerical Count. In Excel for the web, click the small arrow next to the last item instead. The status bar is a quick check only. Nothing is written into the sheet, so use a SUM formula for any total you want to keep.

Adding only some rows: a SUMIF teaser

What if you want to total only the rows that match something, such as every bill marked "Utilities" or every sale by one person? That's what SUMIF does: it's SUM with a condition. It has its own lesson: COUNTIF, SUMIF, AVERAGEIF. For now, plain SUM covers most everyday totals.

Try it yourself

Download the practice workbook and open the Practice sheet. Yellow cells are where you type.

  1. Click B7, press Alt+= (Shift+Cmd+T on a Mac), check the border and press Enter. You should get $1,850.00.
  2. Click E10 and use AutoSum again for the row. The answer is $3,530.00.
  3. In B12, type =SUM(B2:B3,B5:B6) to skip Groceries. You should see $1,420.00.
  4. The "Text trap" total in B20 says $1,420.00. Find the number stored as text, convert it, and watch the total become $1,850.00.
  5. Select B2:B6 and read the Sum in the status bar.
  6. In B23, type =Jan!B2+Feb!B2+Mar!B2. In B24, type =SUM(Jan:Mar!B2). Both should show $1,315.00.

Check everything against the Answers sheet.

Common mistakes

  • Not checking AutoSum's range. A blank row or a heading in the middle makes AutoSum stop early. Look at the dotted border before you press Enter.
  • Including the total cell in its own range. =SUM(B2:B7) typed into B7 makes a circular reference. The range should stop one cell above.
  • Numbers stored as text. The total is too low with no error at all. Look for left-aligned numbers and green triangles.
  • Adding a row below the range. A new row under B6 isn't inside B2:B6, so it isn't counted. Insert new rows above the total row, inside the range, and SUM grows to include them.
  • Typing $ or commas inside SUM. =SUM(1,200) adds 1 and 200, giving 201. Keep raw numbers in cells and let formatting add the $ and commas.
  • Moving a sheet out of a 3-D range. =SUM(Jan:Mar!B2) only counts sheets between the two tabs.

What's next

You can now total almost anything. Next in the course comes Subtract, multiply, divide, which builds on the operators from Formulas: the basics. You can also go back to the full Excel course, or work out a share of your total with the percentage calculator.

Frequently asked questions

How do I total a column in Excel?

Click the empty cell just below the numbers, then click AutoSum on the Home tab (or press Alt+= on Windows, Shift+Cmd+T on a Mac). Check that Excel has outlined the right cells and press Enter. Excel writes a formula like =SUM(B2:B6) for you.

What is the keyboard shortcut for AutoSum?

Alt+= (hold Alt and press the equals key) on Windows. On a Mac it's Shift+Cmd+T. In Excel for the web, the AutoSum button on the Home tab always works.

Why is my SUM formula giving the wrong total or 0?

Usually some of the numbers are stored as text. SUM skips text, so those cells don't count. Look for numbers sitting on the left of the cell with a small green triangle in the corner, select them, click the warning icon and choose Convert to Number.

How do I sum the same cell across several sheets?

Add them one by one with =Jan!B2+Feb!B2+Mar!B2, or use a 3-D reference: =SUM(Jan:Mar!B2) adds B2 on every sheet from Jan to Mar in tab order. Sheet names with spaces need single quotes, like =SUM('Week 1:Week 4'!B2).

Should I use SUM or the plus sign?

For more than two or three cells, use SUM. =A1+B1+C1 shows #VALUE! if one of the cells holds text, while SUM just skips the text. SUM ranges also grow when you insert rows inside them. See Formulas: the basics for how + works.

Can I see a total without writing a formula?

Yes. Select the cells and look at the status bar at the bottom of the Excel window. It shows Sum, Average and Count for the selection. It's a quick check only: nothing is saved in the sheet.