This function will generate a subtotal in a list or database.
Syntax:
=SUBTOTAL(function_num,ref1,[ref2],…)
Parameter list:
Function_num details:
Function_num (includes hidden values) | Function_num (ignores hidden values) | Function_name |
1 | 101 | AVERAGE |
2 | 102 | COUNT |
3 | 103 | COUNTA |
4 | 104 | MAX |
5 | 105 | MIN |
6 | 106 | PRODUCT |
7 | 107 | STDEV |
8 | 108 | STDEVP |
9 | 109 | SUM |
10 | 110 | VAR |
11 | 111 | VARP |
The SUBTOTAL function contains the values of hidden rows, with function num constants ranging from 1 to 11. The SUBTOTAL function excludes values of hidden rows for the function num constants 101 to 111.
No matter whatever function num value you choose, the SUBTOTAL function ignores any rows that are not included in the result of a filter. This function should be used if you have filtered any data and wish to get the SUM or AVERAGE of the filtered values since it ignores the unfiltered values. The SUBTOTAL function is intended for vertical ranges or columns of data.
Ask Your Query