idlewyld89
New Member
- Joined
- Jun 10, 2018
- Messages
- 23
So I'm aware of the xlOr operator to specify up to two unique criteria to be identified and filtered:
However I'm trying to determine how to scale this up to 5+ criteria... I've seen the array method, but it doesn't seem to produce the correct output:
Is there a way of implementing an AutoFilter with the xlOr operator across 5+ criteria?
Code:
Worksheets(MainSheet).ListObjects("FleetStatusDetail").Range.AutoFilter Field:=ReturnHeaderIndex(ThisWorkbook.Name, MainSheet, "FleetStatusDetail", "Hold Codes"), Criteria1:="=*B*", Operator:=xlOr, Criteria2:="=*O*"
However I'm trying to determine how to scale this up to 5+ criteria... I've seen the array method, but it doesn't seem to produce the correct output:
Code:
Worksheets(MainSheet).ListObjects("FleetStatusDetail").Range.AutoFilter Field:=ReturnHeaderIndex(ThisWorkbook.Name, MainSheet, "FleetStatusDetail", "Hold Codes"), Criteria1:=Array("G", "J", "W"), Operator:=xlFilterValues
Is there a way of implementing an AutoFilter with the xlOr operator across 5+ criteria?