Returns the subtotal of the specified arguments.
Syntax
![]() |
---|
SUBTOTAL( Integer function, Number n1, Number n2, ... ) -> Number |
The arguments can be either numbers or cells, ranges, or arrays that contain numbers. Logical values, text, and empty cells are ignored. If the specified arguments do not contain any numbers, the function returns 0.
The following table illustrates the possible values of function and their meaning.
Function | Exclude hidden by filter | Exclude hidden by filter or collapsed |
---|---|---|
AVERAGE | 1 | 101 |
COUNT | 2 | 102 |
COUNTA | 3 | 103 |
MAX | 4 | 104 |
MIN | 5 | 105 |
PRODUCT | 6 | 106 |
STDEV | 7 | 107 |
STDEVP | 8 | 108 |
SUM | 9 | 109 |
VAR | 10 | 110 |
VARP | 11 | 111 |
Formula
![]() |
---|
=SUBTOTAL(9,A1:A5) |
Function Reference
SUM Function
AVERAGE Function