It fails when the find doesn't return a range as an object. You need to handle that.
![]()
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row For x = 1 To 2000 BeginRow = 1 EndRow = 2000 ChkCol = 2 Set c = Cells.Find(What:="TOTAL") If Not c Is Nothing Then c.Select StartRange = ActiveCell.Address Selection.Offset(3, 0).Select EndRange = ActiveCell.Address ActiveSheet.Range(StartRange & ":" & EndRange).Select Selection.EntireRow.Delete End If Next x
Bookmarks