Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting filtered data
Hi, I have a macro which filters data and deletes using the code below.
Cells.Select With Selection .AutoFilter Field:=30, Criteria1:="1" Selection.EntireRow.Delete Shift:=xlUp End With Unfortuantely this deletes the header row as well. Does anyone know how to avoid this happening? Any help greatly appreciated. cheers, Davie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting filtered data
See this example
http://www.rondebruin.nl/delete.htm#AutoFilter -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "davethewelder" wrote in message ... Hi, I have a macro which filters data and deletes using the code below. Cells.Select With Selection .AutoFilter Field:=30, Criteria1:="1" Selection.EntireRow.Delete Shift:=xlUp End With Unfortuantely this deletes the header row as well. Does anyone know how to avoid this happening? Any help greatly appreciated. cheers, Davie |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting filtered data
Ron, thanks for the quick reply. The example worked perfectly.
I posted a problem on the site three days ago but unfortunately no-one has picked it up and I am running out of time to complete this report. Could you possibly have a look at it. It is called "Formatting cell and adjacent cell". If you can't, thanks anyway. Davie "Ron de Bruin" wrote: See this example http://www.rondebruin.nl/delete.htm#AutoFilter -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "davethewelder" wrote in message ... Hi, I have a macro which filters data and deletes using the code below. Cells.Select With Selection .AutoFilter Field:=30, Criteria1:="1" Selection.EntireRow.Delete Shift:=xlUp End With Unfortuantely this deletes the header row as well. Does anyone know how to avoid this happening? Any help greatly appreciated. cheers, Davie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS2007 - deleting filtered data, deletes non-visible data too | Excel Discussion (Misc queries) | |||
Deleting filtered results | Excel Discussion (Misc queries) | |||
Saving Auto-Filtered Data (or deleting the rest) | Excel Discussion (Misc queries) | |||
Deleting filtered rows in Excel | Excel Discussion (Misc queries) | |||
Deleting filtered out data from a worksheet | Excel Worksheet Functions |