Sub test()
If Not Range("d:d").Find("小计") Is Nothing Then Exit Sub '如果看到小计,就退出
Application.DisplayAlerts = False
With Sheet110
.Columns("H:Y").Subtotal GroupBy:=18, Function:=xlSum, TotalList:=Array(1, 4, 7, 16, 17), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End With
End Sub
Sub test()
If Not Range("d:d").Find("小计") Is Nothing Then Exit Sub '如果看到小计,就退出
Application.DisplayAlerts = False
With Sheet110
.Columns("H:Y").Subtotal GroupBy:=18, Function:=xlSum, TotalList:=Array(1, 4, 7, 16, 17), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End With
End Sub