#1
|
|||
|
|||
AutoFilter Criteria3
I am trying to run an Autofilter using multiple criteria. I have no issue with Criteria2, but when I try to enter AutoFilter Criteria3 I end up with a runtime error.
Code that works for 2: Selection.AutoFilter Field:=1, Criteria1:=">03-003", Operator:=xlAnd, _ Criteria2:="<>*x*" Trying to enter for 3: Selection.AutoFilter Field:=1, Criteria1:=">03-003", Operator:=xlAnd, _ Criteria2:="<>*x*", Operator:=xlAnd, Criteria3:="<>Pending" Am I missing something simple? Last edited by coxjamd; 01-17-2013 at 01:15 PM. Reason: typo for Criteria3 |
#2
|
|||
|
|||
On further research it appears that AutoFilter will only filter by 2 criteria. I have a sheet with multiple variables in Column "A". I need to filter out the criteria being less than 03-003 AND not containing "x" and not containing "Pending". Moving some data to another column to be filtered is not an option. This is a live document where rows are regularly being added so I am not sure how an array can help. Any ideas?
|
#3
|
||||
|
||||
If you need more than 2 criteria on the same column then your immediate choices are:
|
Tags |
autofilter, criteria3 |
|