View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Office_Novice Office_Novice is offline
external usenet poster
 
Posts: 245
Default MACRO TO DELETE ROW IF CELL VALUE IS ZERO

Somthing Like


Sub DeleteZero()

Worksheets("Data").Activate
Range("E2").Select

Do
If ActiveCell.Value = "0" Then
ActiveCell.EntireRow.Delete Shift:=xlShiftUp
ElseIf ActiveCell.Value < "0" Then
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub

"K" wrote:

I need macro which should go through in column "E2:E" of sheet
("DATA") and if finds any cell value = 0 then it should delete that
entire row. Note that I have heading in cell "E1"