How to SUM Only Visible (or Filtered) Rows Using SUBTOTAL

Building a Total Row

Let’s build a row to calculate the total sales for each year. Below the table, Label a row as Total. For starters, let’s use the familiar SUM formula. Underneath the column for each year, type the SUM function and select the range of cells in the table for the corresponding year. Since this is an Excel Data Table now, it will convert that cell range (normally, D3:D28) to it’s Data Table range name. Repeat the process for each year’s column.

Total Line

The end result will be a total for each year. Looks great! For now…

Total Line Complete