View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert Robert is offline
external usenet poster
 
Posts: 113
Default Conditional row delete using macr

The macro below deletes alternate rows instead of all rows with Zero. I do not
know VBA. What is wrong.

Application.Goto Reference:="col"
For Each cell_in_loop In Range("col")
If cell_in_loop.Value=0 Then With cell_in_loop.EntireRow.Delete
End With
End If
Next
ActiveWorkbook.SaveAs Filename:=C\Data\Sales.............