View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DENISE DENISE is offline
external usenet poster
 
Posts: 12
Default 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