View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Delete rows with 0

Sub DeleteRows()
Dim rng As Range
Set rng = Range("B:B,D:E")
rng.Replace What:=0, Replacement:="=NA()"
On Error Resume Next
Set rng1 = rng.SpecialCells(xlCellTypeFormulas, _
xlErrors)
On Error GoTo 0
If Not rng1 Is Nothing Then
Set rng1 = Intersect(rng1.EntireRow, Columns(1))
rng1.EntireRow.Delete
End If
End Sub

--
Regards,
Tom Ogilvy


"Duncan J" wrote in message
...
Hi Folks,
Need a way to delete rows if coulmn B D E contain 0.
Any help?
thanks,
DJ