訂正
For i = Cells(Rows.Count,8).End(xlUp).Row To 2 Step -1
If Not (Cells(i, 8) ="集計" Or Cells(1, 8) ="総計") Then
Rows(i).Delete Shift:=xlUp
Next i