Slomaro2000
Board Regular
- Joined
- Jun 4, 2008
- Messages
- 107
Hello all,
I have very large datasets 100k or more. I need the row deleted if the cell a cell in say column A is blank.
These codes work on data sets that are not huge.
Same happens when I just filter by blank and try to delete the rows. Crashes and deletes everything.
Could run this but this takes around 10min for 100k rows. Anything faster? I have looked and looked with no luck.
I have very large datasets 100k or more. I need the row deleted if the cell a cell in say column A is blank.
These codes work on data sets that are not huge.
Code:
Sub Delete1()
Application.ScreenUpdating = False
Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Application.ScreenUpdating = True
End Sub
Same happens when I just filter by blank and try to delete the rows. Crashes and deletes everything.
Could run this but this takes around 10min for 100k rows. Anything faster? I have looked and looked with no luck.
Code:
Sub one()
Dim j As Long
For j = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1
If Cells(j, "A") = "" Then Cells(j, "A").EntireRow.Delete xlUp
Next j
End Sub