Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting rows filled with 0
In Excel 2002 I have a sheet with data table from A1:E9.
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. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting rows filled with 0
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count filled data rows until empty | Excel Discussion (Misc queries) | |||
Hundreds of Blank rowas below my content-filled rows | Excel Discussion (Misc queries) | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
Print data filled rows only | Excel Worksheet Functions | |||
finding the no. of rows in a COL filled with numbers, zeros and bl | Excel Worksheet Functions |