View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
KWhamill KWhamill is offline
external usenet poster
 
Posts: 24
Default Delete row if value is zero

Thank you that was great Now i see what i was doing wrong.
R,
Karl

"Susan" wrote:

======================
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




On Jul 21, 10:05 am, KWhamill
wrote:
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