Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sub DeleteUsingForLoop()
Dim rowIndex As Long
Application.ScreenUpdating = False
With Sheet1
.Range("D1") = Now
For rowIndex = 40000 To 1 Step -1
If .Range("A" & rowIndex).Value < 0.1 Then
.Range("A" & rowIndex).EntireRow.Delete
End If
.Range("E1") = Now
End With
Application.ScreenUpdating = True
MsgBox "Done"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment