Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter in macro
Hi
I'm trying to filter a table in a macro by the contents of a cell which is outside the table range. (Basically, the user, on a separate sheet picks from a list box what they want to filter by, and the results go into a linked cell as usual). At present I am using AutoFilter, but can't seem to put the cell reference in the Criteria1? Is it possible or am I using incorrect syntax? Any help would be great! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter in macro
hi,
how do we know if your are using incorrect syntax unless you post your code? -----Original Message----- Hi I'm trying to filter a table in a macro by the contents of a cell which is outside the table range. (Basically, the user, on a separate sheet picks from a list box what they want to filter by, and the results go into a linked cell as usual). At present I am using AutoFilter, but can't seem to put the cell reference in the Criteria1? Is it possible or am I using incorrect syntax? Any help would be great! . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter in macro
you could just possibly tell me the correct syntax!
" wrote: hi, how do we know if your are using incorrect syntax unless you post your code? -----Original Message----- Hi I'm trying to filter a table in a macro by the contents of a cell which is outside the table range. (Basically, the user, on a separate sheet picks from a list box what they want to filter by, and the results go into a linked cell as usual). At present I am using AutoFilter, but can't seem to put the cell reference in the Criteria1? Is it possible or am I using incorrect syntax? Any help would be great! . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter in macro
Assume I record myself applying an autofilter. I get
Selection.AutoFilter Field:=3, Criteria1:="6" for the criteria argument you could replace the "6" with the range where the criteria is stored Criteria1:=Range("M10").Text -- Regards, Tom Ogilvy "POM" wrote in message ... you could just possibly tell me the correct syntax! " wrote: hi, how do we know if your are using incorrect syntax unless you post your code? -----Original Message----- Hi I'm trying to filter a table in a macro by the contents of a cell which is outside the table range. (Basically, the user, on a separate sheet picks from a list box what they want to filter by, and the results go into a linked cell as usual). At present I am using AutoFilter, but can't seem to put the cell reference in the Criteria1? Is it possible or am I using incorrect syntax? Any help would be great! . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter in macro
Thanks for the help Tom - just what I needed!
"Tom Ogilvy" wrote: Assume I record myself applying an autofilter. I get Selection.AutoFilter Field:=3, Criteria1:="6" for the criteria argument you could replace the "6" with the range where the criteria is stored Criteria1:=Range("M10").Text -- Regards, Tom Ogilvy "POM" wrote in message ... you could just possibly tell me the correct syntax! " wrote: hi, how do we know if your are using incorrect syntax unless you post your code? -----Original Message----- Hi I'm trying to filter a table in a macro by the contents of a cell which is outside the table range. (Basically, the user, on a separate sheet picks from a list box what they want to filter by, and the results go into a linked cell as usual). At present I am using AutoFilter, but can't seem to put the cell reference in the Criteria1? Is it possible or am I using incorrect syntax? Any help would be great! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro filter | Excel Discussion (Misc queries) | |||
macro to filter | Excel Discussion (Misc queries) | |||
Macro Filter | Excel Worksheet Functions | |||
how can this filter be done in a macro? | Excel Discussion (Misc queries) | |||
Need a filter macro | Excel Discussion (Misc queries) |