Excel guide · 3 min read
Excel AutoSum selecting the wrong range
=SUM(B2:B8).Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | |
|---|---|---|
| 1 | Week | Sales |
| 2 | Week 1 | 1240 |
| 3 | Week 2 | 1385 |
| 4 | Week 3 | 990 |
| 5 | Week 4 | 1410 |
| 6 | ||
| 7 | Week 5 | 1175 |
| 8 | Week 6 | 1520 |
| 9 | Total |
Download this sheet as an Excel practice file (.xlsx)
How AutoSum chooses a range
Click the cell under a column and press Alt+= (Cmd+Shift+T on a Mac), or use Home > AutoSum. Excel looks up from that cell and selects the unbroken block of numbers it finds. If there are no numbers above, it looks to the left instead.
It is a guess, and Excel shows it as a moving border before you confirm. Most wrong totals come from pressing Enter without looking at that border.
- Select B9, the empty cell under the numbers.
- Press Alt+= (Windows) or Cmd+Shift+T (Mac).
- Look at the dashed border: it should cover B2:B8.
- If it does not, drag over B2:B8 with the mouse, then press Enter.
Problem 1: a blank row stops the selection
Row 6 is empty, so AutoSum in B9 stops at the gap and selects only Week 5 and Week 6. The total looks plausible, which is why this one slips through.
Fix it by selecting the whole range before you press Alt+=, or by editing the formula. Better still, remove blank rows inside data, or turn the data into a table with Ctrl+T and use its Total Row, which always covers every row.
Result: 2695
2,695: only the two weeks below the blank row, far short of the real total.
Problem 2: numbers stored as text are ignored
Even with the full range, Week 3's 990 is text (it sits on the left of the cell and may show a green triangle). SUM skips text, so the total is 990 short with no warning.
Compare COUNT with COUNTA over the range: COUNT counts numbers only, COUNTA counts anything that is not empty. If they differ, something is text. Convert it with the warning icon > Convert to Number.
Result: 6730
6,730 instead of 7,720, because the text 990 is skipped.
A total that counts text numbers too
While you fix the data, the double minus forces text numbers into real numbers inside the formula. SUMPRODUCT then adds them; the blank row counts as 0.
Treat this as a stopgap. Converting the cells properly also fixes sorting, charts and every other formula that reads them.
Result: 7720
7,720: all six weeks, including the 990 stored as text.
Problem 3: AutoSum sums the row instead of the column
If the cells directly above the active cell are empty, AutoSum looks left and totals the row. This happens when you put a total in a cell that is one row too low, or in a column that starts below a gap.
Check which way the border runs. Click in the formula bar and correct the range, or select the column of numbers first and then press Alt+=, which puts the total right under your selection.
Problem 4: subtotals and filtered rows
If the column already contains a subtotal row, a SUM over the whole column counts those numbers twice. Use SUBTOTAL(9, range) for both the subtotals and the grand total: SUBTOTAL ignores other SUBTOTAL cells inside its range.
On a filtered list, AutoSum inserts SUBTOTAL(9, ...) automatically, which adds only the visible rows. A plain SUM keeps adding the hidden rows too, so do not change it back to SUM if you want the visible total.
Common mistakes
Pressing Enter without checking the border
Look at the dashed range before confirming. Fix it by dragging or by typing the range.
Blank rows inside the data
Delete them, or use a table (Ctrl+T) with a Total Row, which always includes every row.
New rows added below the total are not included
Insert new rows above the total row so the range grows, or use a table, which extends itself.
The total ignores some numbers
They are text. Compare =COUNT(range) and =COUNTA(range), then convert the text with Convert to Number.
FAQ
Why does AutoSum not select all my numbers?
It stops at the first blank cell or non-number above the active cell. Select the full range before pressing Alt+=, or edit the range in the formula.
Why is my SUM total wrong in Excel?
Usually some numbers are stored as text, the range misses rows, or a subtotal is counted twice. Check with COUNT and COUNTA and look at the highlighted range.
What is the shortcut for AutoSum?
Alt+= on Windows and Cmd+Shift+T on a Mac. Select several cells under several columns first to total them all at once.
How do I make the total include new rows automatically?
Convert the data into a table with Ctrl+T and turn on Table Design > Total Row. The total covers every row you add to the table.
Functions used
Related guides
- How to sum a column in Excel
- How to convert numbers stored as text in Excel
- SUMIF returning 0 or not working: causes and fixes
- Excel formula showing as text instead of the result
- Excel formulas cheat sheet: the 25 everyone should know
- How to make a gradebook in Excel
- How to calculate CAGR in Excel
Updated