Sub test()
Dim foundOne As Range
Dim foundTwo As Range, ws As Worksheet
On Error Resume Next
For Each ws In ThisWorkbook.Worksheets
With ws.Range("A:A")
Set foundOne = .Find(What:="1 Analysis", After:=.Range("a1"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If foundOne.Row > 1 Then
Range(.Range("a1"), foundOne.Offset(-1, 0)).EntireRow.Delete shift:=xlUp
End If
Set foundTwo = .Find(What:="2 Analysis", After:=.Range("a1"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
Range(foundTwo.Offset(1, 0), .Cells.SpecialCells(xlCellTypeLastCell)).Delete shift:=xlUp
End With
On Error GoTo 0
Next
End Sub
Bookmarks