excel question not pertaining to Macro Scheduler

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Rory
Pro Scripter
Posts: 50
Joined: Thu Mar 23, 2006 2:50 pm
Location: Wisconsin

excel question not pertaining to Macro Scheduler

Post by Rory » Tue Feb 12, 2008 9:18 pm

I am trying to set up a macro inside of Excel to filter more than two items. I have been able to get it to do 2 but no more than that.

This is what the code looks like in excel:

Selection.AutoFilter Field:=6, Criteria1:="=*R @ 001*", Operator:=xlOr, _
Criteria2:="=*A @ 001*"

Does anybody have experience with this? How can I add additional criteria?

Thanks,
Rory

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Feb 12, 2008 10:55 pm

A little googling reveals that AutoFilter will only take a maximum of two criteria and that Advanced Filter in VBA may help.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts