View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jean-Yves[_2_] Jean-Yves[_2_] is offline
external usenet poster
 
Posts: 253
Default delete rows with 0 values

Sub test
dim rng as range

For each rng in Range("O2", Range("O2").End(xlDown))
If rng.value = "0" or rng.value= "---------"Then rng.clear
Next
columns("O:O").SpecialCells(xlCellTypeBlanks).Enti reRow.Delete
End sub
Regards
Jean-Yves


"andresg1975" wrote in message
...
how can i create a macro that select column O, delete every row that
contains
empty cells, cells with 0 values, and non-numeric cells such as --------.
thanks