Romano_odK
Active Member
- Joined
- Jun 4, 2020
- Messages
- 380
- Office Version
- 365
- Platform
- Windows
Good afternoon,
Got this code which works, but deleting those from a 10000 row table isn't really fast. Does anyone know if there is a faster way to do this?
Thank you for your time.
Got this code which works, but deleting those from a 10000 row table isn't really fast. Does anyone know if there is a faster way to do this?
Thank you for your time.
VBA Code:
Application.ScreenUpdating = False
' Find last row in column A with data
lr = Cells(Rows.Count, "A").End(xlUp).Row
' Loop through all rows backwards, up to row 6
For r = lr To 6 Step -1
' See if columns H, I, or J is empty
If (Cells(r, "J") >= "0") Or (Cells(r, "H") <> "1") Then
' Delete row
Rows(r).Delete
End If
Next r
Application.ScreenUpdating = True