Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this code:
Sub Macro2() Range("A1").AutoFilter Field:=1, Criteria1:="b" Rows("7:9").Delete Shift:=xlUp Selection.AutoFilter End Sub and its used on a small table like this: Name Age a 5 c 75 c 96 c 4 c 8 b 59 b 8 b 7 I've got no way of predicting how many rows there'll be in the table, so how do I generalise the second row of the code? i.e the bit 'Rows("7:9")'. Or do I need to look into an alternative approach? Any help greatly appreciated, Jason. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for deleting rows and serialising the remaing rows | Links and Linking in Excel | |||
Excel 2007 Autofilter deleting unfiltered Data | Excel Worksheet Functions | |||
Deleting rows in a range using Autofilter | Excel Discussion (Misc queries) | |||
Deleting results of an AutoFilter excluding top row | Excel Discussion (Misc queries) | |||
deleting duplicated cells in a list via advanced autofilter? | Excel Discussion (Misc queries) |