View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Perry Perry is offline
external usenet poster
 
Posts: 5
Default Deleting rows filled with 0

Thank you very much for your help Bill. This is what I
wanted and it has helped me out a lot.

-----Original Message-----
Perry Kew wrote:
The actual starts at B2 and ends at E9. If B:E of the

same
row has zero I would like to delete that row. Thus if
cells in the range B3:E3 and cells in the range B8:E8

have
zeros then those rows should be deleted.

With Range("A1:E9")
.AutoFilter
.AutoFilter 2,0
.AutoFilter 3,0
.AutoFilter 4,0
.AutoFilter 5,0
If .Columns(1).SpecialCells(xlVisible).Count1 Then
.Offset(1).Resize(.Rows.Count-1).SpecialCells

(xlVisible).Delete _
Shift:=xlUp
End If
.AutoFilter
End With

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

.