ali_
asked on
Multiple Criteria Selection with VBA on an Autofilter
I'm sure for anyone with some VBA experience this will be easy as, but for me who has no clue I don't know where to start.
I have a macro pulling data from one sheet with an autofilter on and pasting the data on another:
Range("V3").Select
ActiveSheet.Range("$A$1:$A G$999").Au toFilter Field:=28, Criteria1:= _
"Service"
Range("A1:AG999").Select
Range("V3").Activate
Selection.Copy
Sheets("Email Data").Select
ActiveSheet.Paste
All i want to do is simply enter another option e.g.
ActiveSheet.Range("$A$1:$A G$999").Au toFilter Field:=28, Criteria1:= _
"Service" or "MOT" or "Service And MOT"
but as you will probably notice I have no idea of how to do this. How exactly should i type this into VBA please so it doesn't just pull the "service" data but also the "MOT" and the "Service and MOT"?
I have a macro pulling data from one sheet with an autofilter on and pasting the data on another:
Range("V3").Select
ActiveSheet.Range("$A$1:$A
"Service"
Range("A1:AG999").Select
Range("V3").Activate
Selection.Copy
Sheets("Email Data").Select
ActiveSheet.Paste
All i want to do is simply enter another option e.g.
ActiveSheet.Range("$A$1:$A
"Service" or "MOT" or "Service And MOT"
but as you will probably notice I have no idea of how to do this. How exactly should i type this into VBA please so it doesn't just pull the "service" data but also the "MOT" and the "Service and MOT"?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
TO clarify, above will return any entry containing MOT or Service.
ASKER
Spot on. Thanks