Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More than 2 criteria on an autofilter

Status
Not open for further replies.

gremlins

Programmer
Joined
Jul 20, 2003
Messages
20
Location
GB
How do I filter in vba on more than 2 criteria?

I have a list within a worksheet that populates the first column of cells and can be anything from a single value to 16 values.

I need to filter a seperate worksheet with these values. It currently looks a bit like:

selection.autofilter, criteria1:=worksheet(cellref), operator:=xlor, criteria2:=worksheet(cellref)

but obviously I would want this to go up to a possible 16 references.

It appears though that excel is limited to only 2.

How can I get around this?

Cheers
 
Have you tried to use the macro recorder when playing with Advanced filter ?
BTW, here is an Access VBA forum, you may get more accurate replies here:

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top