The result is $9.54, the subtotal of the visible values in column F.


In the worksheet shown above, the goal is to sum the values in column F that are visible. The formula in F4 is: The first argument, function_num, specifies sum as the operation to be performed. SUBTOTAL automatically ignores the 3 rows hidden by the filter and returns $9.54, the subtotal of the visible values in column F. Note that SUBTOTAL always ignores values in rows that are hidden with a filter. If you are hiding rows manually (i.e. right-click > Hide), use this version of the formula instead: Using 109 for the function number tells SUBTOTAL to ignore values in manually hidden rows in addition to those hidden with a filter. To be clear, values in rows that have been hidden with a filter are never included, regardless of function_num. By changing the function number, the SUBTOTAL function can perform many other calculations. See the full list of available function numbers on this page.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.