Create SUBTOTAL Formulas with the AutoSum Button or Keyboard Shortcut
Bottom line: Learn how to use the AutoSum feature and keyboard shortcut to create SUBTOTAL formulas.
Skill level: Beginner
AutoSum Typically Creates SUM Formulas
Excel's AutoSum feature is a great shortcut that automatically creates a formula with the SUM function. It's pretty smart at figuring out the range we want to sum up. We can select a blank cell below a column of data, press the AutoSum button, and the entire formula will be created for us. Huge time saver!
AutoSum also works by selecting a blank cell to the right of a row of data.
The keyboard shortcut is Alt+=. Hold down the Alt key and press the equal sign.
How to use AutoSum to Create SUBTOTAL Formulas
We can also use the AutoSum feature to create formulas with the SUBTOTAL function.
The trick is to first apply a filter to the column that you want to subtotal.
Here are the steps:
- Apply a filter to the range.
- Select a cell in the column or the blank cell below the filtered range.
- Press the AutoSum button or keyboard shortcut (Alt+=). The SUBTOTAL formula will be automatically inserted in the cell.
- Press Enter.
The range reference in the SUBTOTAL formula will include all the cells in the column of the filtered range, even if they are hidden by the filter.
The advantage of using the SUBTOTAL formula is that is only displays the calculation (sum) of the visible rows. It allows us to quickly see the sum, average, count, min, max, etc. of the visible rows after filters are applied.
Checkout my article on the Excel SUBTOTAL function for more details. I also have an article on how to create a SUBTOTAL summary report with a macro.
If you are using Excel Tables, then you don't have to worry about this because the Total Row uses the SUBTOTAL function by default. When you press the AutoSum button or keyboard shortcut in the Total Row of a Table, the SUBTOTAL function will be created. Checkout my article on how to sum all columns in the Total Row of a Table. I also have a video on a beginner's guide to Excel Tables.
This is a bonus tip from my Excel Pro Tips eBook. The eBook is a free download, so make sure you grab a copy.