SubscribeThe SUBTOTAL Function in Excel is used to perform a specified function on a range of Auto filtered cells. When the Auto Filter has been applied the SUBTOTAL function will only use the visible cells, all hidden rows are ignored. The operation performed is solely dependent on the number (between 1 and 11) that we supply to it's first argument Function_num For example;The only annoying part is having to copy/paste-special-->values only the equation results into another table so they don't disappear when you filter for another variable.
=SUBTOTAL(1,A1:A100)
will Average all visible cell in the range A1:A100 after an Auto Filter has been applied. If all rows in A1:A100 are visible it will simply Average them all and give the same result as
=AVERAGE(A1:A100)
The number for the first SUBTOTAL argument, Function_num, and it's corresponding function are as shown below
Function_Num
Function
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP
You are not logged in, either login or create an account to post comments
posted by birdherder at 8:24 AM on January 25