Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
autofilter questions
1. is there a limit to the number of criteria?
2. how do you construct the statement when there is a variable number of criteria? for example, if an array has 3 elements, how do you filter on the 3 criteria. for i = lbound(arr) to ubound(arr) .AutoFilter Field:=1, Criteria1:=arr(i) next i can't figure out to how construct Criteria(i). -- Gary |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
autofilter questions
You're limited by the same thing that you see when you do it manually.
In xl2003, there are two criteria. I sometimes use a helper column with formulas that return true/false and then filter by that column. Gary Keramidas wrote: 1. is there a limit to the number of criteria? 2. how do you construct the statement when there is a variable number of criteria? for example, if an array has 3 elements, how do you filter on the 3 criteria. for i = lbound(arr) to ubound(arr) .AutoFilter Field:=1, Criteria1:=arr(i) next i can't figure out to how construct Criteria(i). -- Gary -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
autofilter questions
ps. Record a macro when you do it manually and you'll see the code that works.
Gary Keramidas wrote: 1. is there a limit to the number of criteria? 2. how do you construct the statement when there is a variable number of criteria? for example, if an array has 3 elements, how do you filter on the 3 criteria. for i = lbound(arr) to ubound(arr) .AutoFilter Field:=1, Criteria1:=arr(i) next i can't figure out to how construct Criteria(i). -- Gary -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
autofilter questions
thanks dave, i think i'll just build a new report, probably take 10 minutes.
-- Gary "Dave Peterson" wrote in message ... You're limited by the same thing that you see when you do it manually. In xl2003, there are two criteria. I sometimes use a helper column with formulas that return true/false and then filter by that column. Gary Keramidas wrote: 1. is there a limit to the number of criteria? 2. how do you construct the statement when there is a variable number of criteria? for example, if an array has 3 elements, how do you filter on the 3 criteria. for i = lbound(arr) to ubound(arr) .AutoFilter Field:=1, Criteria1:=arr(i) next i can't figure out to how construct Criteria(i). -- Gary -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel 2007 autofilter change to 2003 autofilter functionality? | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
Answers to questions posing more questions in a workbook | Excel Worksheet Functions | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
Questions: Copy ranges, autofilter macro, subtotals, & naming shee | Excel Programming |