SubTotal
Parameters of SubTotal
Private Sub CommandButton1_Click()
Range("A1").CurrentRegion.Subtotal _
GroupBy:=2, _
Function:=xlSum, _
TotalList:=Array(4, 5), _
Replace:=True
End Sub
Sub Total and Grand Total