I have a spreadsheet with 200,000+ rows. I need to go through it and if in a certain column, a cell is blank, then delete that row.
I was wondering if there's any quicker way or any ideas as to how to speed this up.
Here's what I have for the loop where it deletes rows:
For i = Cells(Rows.Count, LastRowCounter).End(xlUp).row To headerQ Step -1
If IsEmpty(Cells(i, Column2DeleteRowsFrom).Value) Then Cells(i,Column2DeleteRowsFrom).EntireRow.Delete
Next i
Note: "lastRowCounter" is the column I chose (i.e. "A","B", etc.) "HeaderQ" is either 1 or 2, depending if I have headers.
AFAIK the main other way would be to use, instead of the for loop I have, to do something like (pseudo code)
For each cel in Range([the range])
If isempty(cel) then delete
next cel
But don't know that that'd be any faster.
Thanks for any ideas/tips!
(NOTE: I have turned off screen refreshing, and also have no calculations in the sheet, it's simply data).