I am posting my question again as it seems it has not been posted.
In case it has already been posted (but I don't see it), please accept my apologies.
Hello,
I sometimes use the VBA Filter function to filter a 1-dimensional array:
Filter(sourcearray, match, [ include, [ compare ]])
But I am wondering:
It it possible to filter an array on 2 strings (e.g. "cats" and "dogs") instead of on only 1 string "cats"?
Dim var As Variant
var = Array("cats", "dogs")
vArray2 = Filter(vArray1, var, True, vbTextCompare)
I tried the above, but it gives an error: "Type Mismatch".
Is there any workaround?
I would like Filter (or any other function) to return all rows containing either "cats" or "dogs" for displaying in a combo box.
Thanks for any help.
Leon