Custom filtering in excel 2003 with more than 2 multifilter option

G

Gibu John George

I am working on a macro to filter out a column in Excel 2003. but i am
facing a problem in the Custom option of Auto filter, it can check for only 2
values using And / Or

Selection.AutoFilter Field:=5, Criteria1:="=a",
Operator:=xlOr,Criteria2:="=b"

Is there any way to increase this to more than 2 values?

I have also tried
Selection.AutoFilter Field:=5, Criteria1:="=a", Operator:=xlOr,
Criteria2:="=b", Operator :=xlOr,Criteria3:="=c"

but still no joy.

I have also tried putting the Criteria as an array, as used in excel 2007,
but those dont work in excel 2003

ActiveSheet.Range("$A$1:$AP$437").AutoFilter Field:=2, Criteria1:=Array(
"a", "b", "c") , Operator:=xlFilterValues

Is there any solution for this?
 
B

Bob Phillips

Not that I know of.

I tend t0 create a helper column with a formula that checks all possible
options and outputs TRUE or FALSE, and filter by the helper column.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top