I have this code that I wrote to remove all rows across all sheets that have the text, actual:, in it but doesn't work. Keep getting the error Next without for, but not sure where exactly to edit it.
Sub Removetextrow()
Dim WS As Worksheet
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each WS In ActiveWorkbook.Worksheets
With WS
With WS.UsedRange
Do
Cells.Find(What:="Actual:", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Selection.EntireRow.Delete
Loop
End With
Next WS
Application.ScreenUpdating = True
Application.Calculation = xlCalculationManual
End Sub
Any help will be greatly appreciated.
Bookmarks