Skip to content

Instantly share code, notes, and snippets.

@ndthanh
Last active November 12, 2018 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndthanh/578415a01f15d7b23f0699ac80d3f701 to your computer and use it in GitHub Desktop.
Save ndthanh/578415a01f15d7b23f0699ac80d3f701 to your computer and use it in GitHub Desktop.
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
Next
.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