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
|