Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Filtered Rows - without deleting column headings
I have the following code that filters the rows that I
want to delete, however it also deletes the column headings. How do I change it to preserve the headings? Thanks in advance for your help. ' Find the rows that do not have a D or a Z in column C ' and delete them. Cells with D are orders rows, cells ' with Z are Sales Doc rows. Columns("C:C").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="<Z*", Operator:=xlAnd, _ Criteria2:="<D*" Cells.SpecialCells(xlCellTypeVisible).EntireRow.De lete |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Filtered Rows - without deleting column headings
Hi Denise
See how Tom use rng2 in this example to copy http://www.contextures.com/xlautofilter03.html#Copy You can adapt the code to delete My new Addin can do this also http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Denise" wrote in message ... I have the following code that filters the rows that I want to delete, however it also deletes the column headings. How do I change it to preserve the headings? Thanks in advance for your help. ' Find the rows that do not have a D or a Z in column C ' and delete them. Cells with D are orders rows, cells ' with Z are Sales Doc rows. Columns("C:C").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="<Z*", Operator:=xlAnd, _ Criteria2:="<D*" Cells.SpecialCells(xlCellTypeVisible).EntireRow.De lete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Permanently Deleting filtered rows | Excel Discussion (Misc queries) | |||
Excel 2007 - Deleting Filtered Rows | Excel Discussion (Misc queries) | |||
Deleting filtered rows in Excel | Excel Discussion (Misc queries) | |||
Deleting filtered rows in Excel | Excel Discussion (Misc queries) | |||
Help!! I have problem deleting 2500 rows of filtered rows!!!! | Excel Discussion (Misc queries) |