I am trying to add code to a macro to autofilter based on if a specific column contains one of several strings. Here's what I did for 2 strings (R is the range):
R.AutoFilter Field:=ProductTypeCol, _
Criteria1:=Array("*maintenance*", "*services*"), _
Operator:=xlFilterValues
This works exactly as I expected, and shows some rows for each string. Then I added a third string and re-executed the macro:
R.AutoFilter Field:=ProductTypeCol, _
Criteria1:=Array("*maintenance*", "*services*", "*training*"), _
Operator:=xlFilterValues
Instead of showing some additional rows, this mysteriously results in no rows at all.
So in search of truth, I removed the asterisks from all three strings and got exactly what I expected: rows where the value was exactly one of those strings. Unfortunately, I really need those asterisks.
Am I missing something here?