SUBTOTAL
Description
Returns a subtotal based on the specified type of calculation and the cells to use.
The function doesn't include values from hidden rows (but it does from hidden
columns), depending on the aggregation specifier. The function doesn't include
values from rows that have been filtered out. A value that's the result of, or
includes, a SUBTOTAL() function isn't included in the new SUBTOTAL(). If you specify
multiple ranges, then the function includes all values from the ranges in the final
aggregation.
Syntax
SUBTOTAL(
function_num
,
ref1
, [
ref2
], ...)
- function_num: The number representing the function to perform.FunctionTo Include Hidden ValuesTo Ignore Hidden ValuesAVERAGE1101COUNT2102COUNTA3103MAX4104MIN5105PRODUCT6106STDEV7107STDEVP8108SUM9109VAR10110VARP11111
- ref1: A reference to cells containing values for the calculation.
- ref2: A reference to cells containing values for the calculation.