Delete row if value is zero

  • Thread starter Thread starter KWhamill
  • Start date Start date
K

KWhamill

I'm trying to create an if statement that will delete entire rows where the
value in Column N is less than .01 or efectively zero for my purposes. The
little bit i've figured out will delete the row but only if the whole row is
blank. If any one can help me all the better.
Thank you,
Karl
 
======================
Option Explicit

Sub step_backwards()


Dim myLastRow As Long
Dim r As Long
Dim c As Range


myLastRow = ActiveSheet.Cells(10000, 1).End(xlUp).Row


For r = myLastRow To 1 Step -1
Set c = ActiveSheet.Range("a" & r)
If c.Value = "" Then
c.EntireRow.Delete
End If
Next r


End Sub
=========================
it looks for blanks in column A. change that if you need to.
hope it helps
:)
susan
 
Back
Top