Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with autofilter and filtering a specific column
in a macro that filters a specific column i have the following code...
ActiveSheet.Range("A7:CQ199").AutoFilter Field:=31, Criteria1:="=3", _ Operator:=xlOr, Criteria2:="=4" however, i have since given everything named ranges to make the table more dynamic (so i dont have to modify my code everytime i add a column or another row of data). so what i want to filter is column AE (hence field 31). i named it ("AE7:AE199") "list"... but when i modify the existing code to... ActiveSheet.Range("list").AutoFilter Field:=1, Criteria1:="=3", _ Operator:=xlOr, Criteria2:="=4" it does not work. how can i get this to work? any help is appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with autofilter and filtering a specific column
Hello Drew,
Try the following. Note that a space and underscore at the end of a line is a line break in an otherwise single line of code. With ActiveSheet.AutoFilter.Range .AutoFilter Field:=1, Criteria1:="=3", _ Operator:=xlOr, Criteria2:="=4" End With -- Regards, OssieMac |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why is autofilter only filtering up to # of rows in prev column? | Excel Discussion (Misc queries) | |||
Autofilter Criteria not filtering when using NOW() | Excel Programming | |||
Autofilter Not Filtering Properly | Excel Discussion (Misc queries) | |||
AutoFilter only filtering first 1000 | Excel Discussion (Misc queries) | |||
Filtering out dates using autofilter | Excel Programming |