Thread: Deleting Rows
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Don Guillett
 
Posts: n/a
Default Deleting Rows

try
Sub deletezerorows()
Application.DisplayAlerts = False
On Error Resume Next
vlr = Cells(Rows.Count, "d").End(xlUp).Row
With Range(Cells(2, "D"), Cells(vlr, "D"))
.AutoFilter Field:=1, Criteria1:="0"
..SpecialCells(xlCellTypeVisible).Delete
.AutoFilter
End With
Application.DisplayAlerts = False
End Sub

--
Don Guillett
SalesAid Software

"fak119" wrote in message
...
For a Macro novice...

Is there an easy macro that deletes rows when a particular cell has the
value 0 (zero)?

Thank you