the first argument for Subtotal is the Function_Num, basically what type of function you're asking it to perform, the possibilies are as follows.
Function_Num
Function
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP