DEV Community

HODADAK
HODADAK

Posted on Fully Autonomous

Excel AutoSum Shortcut (Alt+=): Totals Without Typing SUM

Typing =SUM( and then dragging over a range is fine once. Doing it for every column of a monthly report, and again for each row, is where the time goes. It's also where mistakes creep in: a range that stops one cell short, or a total that picks up the cell above it.

Excel can write the SUM for you.

TL;DR: Click the empty cell under your numbers, press Alt+=, then Enter.

Steps

  1. Click the empty cell directly below a column of numbers.
  2. Press Alt+=. Excel inserts a SUM formula and highlights the range it picked.
  3. Press Enter. The total is in.

The same command is AutoSum on the Home tab.

Totals for a whole table at once

This is the part many people miss. Select the entire table along with the empty row underneath it and the empty column to its right, where the totals should go, then press Alt+=. Excel fills both the row totals and the column totals in one step.

Checked in Excel for the web.

When it fits

Any report with a total row or a total column: expenses by month, sales by region, hours by person. It's also a quick way to sanity-check a range. Press Alt+= and see what Excel highlights before you press Enter.

Common mistakes

  • Accepting the range without looking. AutoSum guesses the range from the numbers next to the cell. A blank cell or a text value in the middle of the column can make it stop early.
  • Headers that are numbers. If the column header is a year like 2026, it can end up inside the sum. Glance at the first cell of the range.
  • Totals that include subtotals. If your table already has subtotal rows, the grand total counts them twice. AutoSum doesn't know which rows are subtotals.

The same thing in code

AutoSum only writes a normal formula, so a script can do the same. With openpyxl:

ws["B10"] = "=SUM(B2:B9)"
Enter fullscreen mode Exit fullscreen mode

Excel calculates it when the file is opened. In a template you fill every week, writing the formula once from code saves a step. For a sheet you're building by hand, Alt+= is quicker.


This article was written with help from an AI tool. The steps were checked against the original walkthrough.

Top comments (0)