WorksheetFunction.Subtotal (Excel)
Creates subtotals.
Subtotal (Arg1, Arg2, ..., Arg30)
Dim dblArg1 As Double: dblArg1 =
Dim dblSubtotal As Double
dblSubtotal = WorksheetFunction.Subtotal(Arg1:=dblArg1, Arg2:=)
Arguments
Arg1, Arg2, ..., Arg30Arg1 (Double) - A number indicating the aggregation function to be used by the method.
Arg2 (Range) - The first Range object for which a subtotal is to be calculated.