Formulas and Functions Help
- Welcome
 - 
        
        
- ACCRINT
 - ACCRINTM
 - BONDDURATION
 - BONDMDURATION
 - COUPDAYBS
 - COUPDAYS
 - COUPDAYSNC
 - COUPNUM
 - CUMIPMT
 - CUMPRINC
 - CURRENCY
 - CURRENCYCODE
 - CURRENCYCONVERT
 - CURRENCYH
 - DB
 - DDB
 - DISC
 - EFFECT
 - FV
 - INTRATE
 - IPMT
 - IRR
 - ISPMT
 - MIRR
 - NOMINAL
 - NPER
 - NPV
 - PMT
 - PPMT
 - PRICE
 - PRICEDISC
 - PRICEMAT
 - PV
 - RATE
 - RECEIVED
 - SLN
 - STOCK
 - STOCKH
 - SYD
 - VDB
 - XIRR
 - XNPV
 - YIELD
 - YIELDDISC
 - YIELDMAT
 
 - 
        
        
- ABS
 - CEILING
 - COMBIN
 - EVEN
 - EXP
 - FACT
 - FACTDOUBLE
 - FLOOR
 - GCD
 - INT
 - LCM
 - LN
 - LOG
 - LOG10
 - MDETERM
 - MINVERSE
 - MMULT
 - MOD
 - MROUND
 - MULTINOMIAL
 - MUNIT
 - ODD
 - PI
 - POLYNOMIAL
 - POWER
 - PRODUCT
 - QUOTIENT
 - RAND
 - RANDARRAY
 - RANDBETWEEN
 - ROMAN
 - ROUND
 - ROUNDDOWN
 - ROUNDUP
 - SEQUENCE
 - SERIESSUM
 - SIGN
 - SQRT
 - SQRTPI
 - SUBTOTAL
 - SUM
 - SUMIF
 - SUMIFS
 - SUMPRODUCT
 - SUMSQ
 - SUMX2MY2
 - SUMX2PY2
 - SUMXMY2
 - TRUNC
 
 - 
        
        
- ADDRESS
 - AREAS
 - CHOOSE
 - CHOOSECOLS
 - CHOOSEROWS
 - COLUMN
 - COLUMNS
 - DROP
 - EXPAND
 - FILTER
 - FORMULATEXT
 - GETPIVOTDATA
 - HLOOKUP
 - HSTACK
 - HYPERLINK
 - INDEX
 - INDIRECT
 - INTERSECT.RANGES
 - LOOKUP
 - MATCH
 - OFFSET
 - REFERENCE.NAME
 - ROW
 - ROWS
 - SORT
 - SORTBY
 - TAKE
 - TOCOL
 - TOROW
 - TRANSPOSE
 - UNION.RANGES
 - UNIQUE
 - VLOOKUP
 - VSTACK
 - WRAPCOLS
 - WRAPROWS
 - XLOOKUP
 - XMATCH
 
 - 
        
        
- AVEDEV
 - AVERAGE
 - AVERAGEA
 - AVERAGEIF
 - AVERAGEIFS
 - BETADIST
 - BETAINV
 - BINOMDIST
 - CHIDIST
 - CHIINV
 - CHITEST
 - CONFIDENCE
 - CORREL
 - COUNT
 - COUNTA
 - COUNTBLANK
 - COUNTIF
 - COUNTIFS
 - COVAR
 - CRITBINOM
 - DEVSQ
 - EXPONDIST
 - FDIST
 - FINV
 - FORECAST
 - FREQUENCY
 - GAMMADIST
 - GAMMAINV
 - GAMMALN
 - GEOMEAN
 - HARMEAN
 - INTERCEPT
 - LARGE
 - LINEST
 - LOGINV
 - LOGNORMDIST
 - MAX
 - MAXA
 - MAXIFS
 - MEDIAN
 - MIN
 - MINA
 - MINIFS
 - MODE
 - NEGBINOMDIST
 - NORMDIST
 - NORMINV
 - NORMSDIST
 - NORMSINV
 - PERCENTILE
 - PERCENTRANK
 - PERMUT
 - POISSON
 - PROB
 - QUARTILE
 - RANK
 - SLOPE
 - SMALL
 - STANDARDIZE
 - STDEV
 - STDEVA
 - STDEVP
 - STDEVPA
 - TDIST
 - TINV
 - TTEST
 - VAR
 - VARA
 - VARP
 - VARPA
 - WEIBULL
 - ZTEST
 
 - Copyright
 

SUBTOTAL
The SUBTOTAL function returns a subtotal for a range of cells.
SUBTOTAL(function-num, range, range…)
function-num: The function to use for the subtotal.
AVERAGE (1): Uses the AVERAGE function.
COUNT (2): Uses the COUNT function.
COUNTA (3): Uses the COUNTA function.
MAX (4): Uses the MAX function.
MIN (5): Uses the MIN function.
PRODUCT (6): Uses the PRODUCT function.
STDEV (7): Uses the STDEV function.
STDEVP (8): Uses the STDEVP function.
SUM (9): Uses the SUM function.
VAR (10): Uses the VAR function.
VARP (11): Uses the VARP function.
AVERAGE_H (101): Uses the AVERAGE function and skips hidden rows.
COUNT_H (102): Uses the COUNT function and skips hidden rows.
COUNTA_H (103): Uses the COUNTA function and skips hidden rows.
MAX_H (104): Uses the MAX function and skips hidden rows.
MIN_H (105): Uses the MIN function and skips hidden rows.
PRODUCT_H (106): Uses the PRODUCT function and skips hidden rows.
STDEV_H (107): Uses the STDEV function and skips hidden rows.
STDEVP_H (108): Uses the STDEVP function and skips hidden rows.
SUM_H (109): Uses the SUM function and skips hidden rows.
VAR_H (110): Uses the VAR function and skips hidden rows.
VARP_H (111): Uses the VARP function and skips hidden rows.
range: The range of cells for which to calculate a subtotal.
range…: Optionally include one or more additional ranges of cells for which to calculate a subtotal.
Notes
You can skip hidden rows by adding 10 if function-num is a single digit and 1 if function-num is two-digits. For example, use 101 for AVERAGE.
Hidden columns never affect the value of SUBTOTAL.
If range or range… includes other SUBTOTAL formulas, they are ignored.
Examples  | 
|---|
Given the following table, in which row 2 is a hidden row:  | 
A  | |
|---|---|
1  | 63  | 
2 (hidden)  | 12  | 
3  | 42  | 
4  | 17  | 
5  | 52  | 
=SUBTOTAL(1, A1:A5) returns 37.2, the average of the subtotal of cells A1:A5 (including hidden rows). =SUBTOTAL(105, A1:A5) returns 17, the minimum value in cells A1:A5 when hidden rows are skipped. =SUBTOTAL(9, A1:A5) returns 186, the sum of cells A1:A5 (including hidden rows). =SUBTOTAL(109, A1:A5) returns 174, the sum of cells A1:A5 when hidden rows are skipped.  |