Field Guide

AutoSum in Excel: the one-click total, and when it grabs the wrong range

Updated

To total a column of numbers in Excel, click the empty cell right below it, then click AutoSum, the Greek sigma (Σ) button on the Home tab, or press Alt+=. Excel writes a SUM formula, highlights the run of numbers it thinks you mean, and shows the total once you press Enter. That one click is AutoSum, and its whole job is guessing the range for you. The catch lives in the word guess: when a blank row or a text label sits in the column, AutoSum can stop short and total only part of it.

If you would rather write the total yourself, typing the arithmetic by hand with + or a SUM you type is the alternative; this page is about the button that writes it for you.

Where is the AutoSum button?

AutoSum sits in two places on the ribbon: Home > AutoSum, in the Editing group, and Formulas > AutoSum. Both run the same command. Select a cell, click it, and, in Microsoft’s words, “When you select AutoSum, Excel automatically enters a formula (that uses the SUM function) to sum the numbers.” The keyboard shortcut skips the ribbon: Alt+= on Windows, Cmd+Shift+T on a Mac.

What lands in the cell is an ordinary SUM formula, the same one you could write by hand. AutoSum only fills in the range.

How AutoSum guesses the range

AutoSum reads the cells next to the one you selected. Put the cursor in the empty cell below a column and it proposes the numbers above; put it in the empty cell to the right of a row and it proposes the numbers to the left. It takes a contiguous run: the numbers next to the cell, up to the first cell that is blank or holds text. Excel highlights that run so you can see it before you commit, and pressing Enter writes the total.

B7
fx
=SUM(B2:B6)

With five amounts in B2:B6 and the cursor in B7, AutoSum highlights B2:B6 and writes =SUM(B2:B6). The header in B1 is text, so the run stops below it and starts at B2.

When AutoSum grabs the wrong range

The same rule that makes AutoSum quick is what trips it. Because the run stops at the first blank or text cell, a gap in the column cuts the total short. Here a blank row 4 separates two groups of expenses:

B7
fx
=SUM(B5:B6)
A B
1 Expense Amount
2 Rent 1200
3 Insurance 340
4
5 Groceries 260
6 Fuel 90
7 Total 350
AutoSum in B7 looks up the column and stops at the blank row 4, so it proposes =SUM(B5:B6): 260 + 90 = 350. Rent and Insurance sit above the gap, so the 1200 and 340 are left out and the total reads 350 when the four amounts add to 1890.
=SUM(B5:B6)
AutoSum stopped at the blank row 4 and boxed only the two amounts below it, so Rent and Insurance never reached the total.

Microsoft’s own guidance is to check the highlighted border before accepting it, because the range AutoSum proposes may not include every number you wanted, in which case you drag it wider or retype it. A header row, a subtotal line, or a stray blank all do the same thing: cap the run early. So the fix is a habit. After you click AutoSum, glance at the cells it lit up, and press Enter only once they cover every number you meant.

The arrow next to AutoSum: Average, Count, Max, Min

AutoSum is not only SUM. The small arrow next to the button opens a short list of the other running totals it can write. On the Home tab you select the arrow next to Sum in the Editing group and pick Min for the smallest value or Max for the largest; Average and Count Numbers sit in the same list. Count Numbers writes a COUNT, which tallies how many cells in the range hold numbers, so it is the count side of AutoSum rather than a total. Each choice drops a matching formula into the cell and guesses the range the same way SUM does.

In a table’s Total Row, totals write SUBTOTAL

There is one place a total changes what it writes. In an Excel table, turn on the Total Row (Table Tools > Design, then check Total Row) and pick a function from the drop-down in a total cell, and Excel enters a SUBTOTAL in place of a SUM. Microsoft’s example is =SUBTOTAL(109,[Midwest]), where 109 is the SUBTOTAL code for SUM. A SUBTOTAL instead follows the filter: it leaves out any rows the filter has hidden, where a plain SUM adds them all. The SUBTOTAL function covers the codes and the filter behavior in full.

The short version

Frequently asked questions

What is AutoSum in Excel?
AutoSum is the one-click button, a Greek sigma, that writes a SUM formula for the numbers next to the cell you selected. It sits on the Home tab in the Editing group and again on the Formulas tab. Click it in the empty cell below a column or to the right of a row, Excel guesses the range and writes a SUM over it, and you press Enter to see the total.
What is the keyboard shortcut for AutoSum?
On Windows it is Alt+=, holding Alt and pressing the equals key, which Microsoft lists as inserting the Sum formula. On a Mac the shortcut is Cmd+Shift+T. Either one drops the same SUM formula into the selected cell, so you still check the highlighted range and press Enter.
How do I sum a column in Excel?
Select the empty cell directly below the column, then click AutoSum on the Home tab or press Alt+=. Excel proposes the run of numbers above the cell and writes a SUM over them. Read the highlighted range to confirm it covers every value you meant, then press Enter to write the total into the cell.
Why does AutoSum give the wrong total?
AutoSum totals a contiguous run of cells and stops at the first blank or text cell, so a blank row or a header inside the column cuts the range short and leaves some numbers out. It also proposes rather than commits: Excel highlights the range it guessed, and it is on you to widen that range before pressing Enter when it does not reach every number.
What else can AutoSum do besides sum?
The arrow next to the button opens the other running totals: Average, Count Numbers, Max, and Min, alongside Sum. Count Numbers writes a COUNT of how many cells hold numbers, Max and Min return the largest and smallest value, and Average returns the mean. Each one picks its range the same way SUM does.
Does AutoSum use SUM or SUBTOTAL?
On ordinary cells AutoSum writes a plain SUM. Inside an Excel table's Total Row, though, choosing a function from the drop-down writes a SUBTOTAL instead, such as =SUBTOTAL(109,[Column]), where 109 is the SUM code. A SUBTOTAL leaves out rows a filter has hidden, while a plain SUM adds them all.

Catch the errors before they ship

Reviewing a change to a model? Compare the two versions in your browser and see every changed cell, formula, and value. It's free, and nothing leaves your computer.