OK, I am posting this, pretty sure the answer is NO
But worth an ask.
And I know the work around is either all coded extracts, OR advanced filters.
And YES it ought to be in a database, but it can’t be!
So, back to the question!
You can have auto-filter to A or B or C etc using an array and passing it to the filter
For example, the following picks a set of selected entries off a custom form list box
and then passes them to a string array
lngCT = 0 For varI = 0 To lstDiscipline.ListCount - 1 If lstDiscipline.Selected(varI) = True Then strCritTeam(lngCT) = lstDiscipline.List(varI) lngCT = lngCT + 1 End If Next 'Apply Filter to a Range If lngT 0 Then lsoData.Range.AutoFilter Field:=4, Criteria1:=strCritTeam, Operator:=xlFilterValues
It will even work IF you use a wild card Character when building the array
lngCT = 0 For varI = 0 To lstDiscipline.ListCount - 1 If lstDiscipline.Selected(varI) = True Then strCritTeam(lngCT) = "*" & lstDiscipline.List(varI) & "*" lngCT = lngCT + 1 End If Next 'Apply Filter to a Range If lngT 0 Then lsoData.Range.AutoFilter Field:=4, Criteria1:=strCritTeam, Operator:=xlFilterValues
But in case 2 it fails if there are more than 2 array entries.
I am guessing this is because CONTAINS which is the wild card filter is a custom filter and only allows 2 criteria on a single field, which is a shame.
So other than advanced filter, anyone any ideas?
There could be up to 10 wild card search variants on a single field, and this applies to more than one field too, so building
the criteria range on the fly in vba on a hidden sheet is a bit tedious.
My alternative is to port all the data out to maybe a SQL database temporarily, do a query there and then port it back.
BUT… I doubt they will allow that.
It is looking like we have to use Excel.
Ahhhhh Happy days.. :confused: