SUBTOTAL(function_nbr,ref1,ref2,…)
function_nbr: determines which function to use according to the following table:
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP
ref1: first value
ref2: second value
This function is Excel compatible.