Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a filtered set
Hello,
As a part of a macro I would like to turn auto filters on and then find rows of data that contain a zero in the 4th field. I would then like to delete the rows contained in the results - however, the range may be different each time the macro is run. is there a way to delete the results in general - can you help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a filtered set
Try this in Column A:
Sub FilterZeros() Columns("A:A").AutoFilter Range("A:A").AutoFilter Field:=1, Criteria1:="=0", Operator:=xlAnd Range("A:A").SpecialCells(xlCellTypeVisible).Entir eRow.Delete Shift:=xlUp End SUb -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "cmac" wrote: Hello, As a part of a macro I would like to turn auto filters on and then find rows of data that contain a zero in the 4th field. I would then like to delete the rows contained in the results - however, the range may be different each time the macro is run. is there a way to delete the results in general - can you help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Permanently delete filtered records | Excel Discussion (Misc queries) | |||
Autofilter - delete filtered selection | Excel Programming | |||
Delete the filtered records | Excel Discussion (Misc queries) | |||
Delete Rows Filtered within Auto Filter | Excel Programming | |||
Excel - How do I delete filtered out rows? | Excel Discussion (Misc queries) |