Hello!
I'm getting this error, "Object variable or With block variable not set" using this macro:
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
For x = 1 To 2000
BeginRow = 1
EndRow = 2000
ChkCol = 2
Cells.Find(What:="TOTAL").Select
StartRange = ActiveCell.Address
Selection.Offset(3, 0).Select
EndRange = ActiveCell.Address
ActiveSheet.Range(StartRange & ":" & EndRange).Select
Selection.EntireRow.Delete
Next x
How do I set the variable or otherwise overcome this? The macro is working, it's just not seeming to come to an error-free end. I want the macro to find each "total" cell and then hide a few rows. The sheet size will vary, so I set an arbitrary number of times to repeat, knowing it won't be more than 2000. But it seems like it's not finding an ending and I don't know how to fix that.
Thank you!
Bookmarks