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.
Code
Sub Removetextrow()[/FONT][/COLOR][COLOR=black][FONT=Verdana] [/FONT][/COLOR][COLOR=black][FONT=Verdana] Dim WS As Worksheet Application.ScreenUpdating = False Application.Calculation = xlCalculationManual For Each WS In ActiveWorkbook.Worksheets With WSWith WS.UsedRange[/FONT][/COLOR][COLOR=black][FONT=Verdana]Do Cells.Find(What:="Actual:", After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate Selection.EntireRow.DeleteLoop[/FONT][/COLOR][COLOR=black][FONT=Verdana] End With Next WS Application.ScreenUpdating = True Application.Calculation = xlCalculationManualEnd Sub
[/FONT][/COLOR]
Any help will be greatly appreciated.