それを行うための最速の方法(試してテスト済み)
Option Explicit
Sub Sample()
Dim aCell As Range, bCell As Range
Dim ExitLoop As Boolean
With Sheets("Sheet1")
.Columns("A:B").Subtotal GroupBy:=2, Function:=xlCount, TotalList:=Array(2), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Set aCell = .Cells.Find(What:=" Count", LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If Not aCell Is Nothing Then
Set bCell = aCell
.Rows(aCell.Row).ClearContents
Do While ExitLoop = False
Set aCell = .Cells.FindNext(After:=aCell)
If Not aCell Is Nothing Then
If aCell.Address = bCell.Address Then Exit Do
.Rows(aCell.Row).ClearContents
Else
ExitLoop = True
End If
Loop
End If
.Cells.RemoveSubtotal
End With
End Sub
行1にはヘッダーがあると想定しています。
マクロの動作