View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Delete rows with 0

Try this one
< you must have data (or header) in row 1 to use the UsedRange example

Sub Example1()
Dim Lrow As Long
Dim CalcMode As Long
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With

With ActiveSheet
.DisplayPageBreaks = False
For Lrow = .UsedRange.Rows.Count To 1 Step -1
If .Cells(Lrow, "B").Value = 0 And _
.Cells(Lrow, "D").Value = 0 And _
.Cells(Lrow, "E").Value = 0 Then .Rows(Lrow).Delete
Next
End With
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With
End Sub


See for more examples this page
http://www.rondebruin.nl/delete.htm





--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



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