I am trying to filter a set of data based a predetermined range of variables. These will be declared by the user of the spreadsheet in a set area of the "home" worksheet. However when running the macro it will return no results. I have attempted to resolve this in multiple ways however nothing has returned the desired results.
Up until now i have tried using operators, declaring the values as an array, filtering for the range of cells which will contain the values and also wildcards.
My current code is as below, neither of these return the output i would like
Dim fliterStr As Variant
filterStr = wsHome.Range("R6:R12").Value
wsMissing.Range("G1").AutoFilter field:=7, Criteria1:=filterStr
wsMissing.Range("G1").AutoFilter field:=7, Criteria1:="*X*", Operator:=xlFilterValues, Criteria2:="*Y*"
the expected results would be the filter searching for any values matching the variables in the range of R6:R12, however currently this is returning as blank.
the second piece of code returns some but not all of the desired results. if i exclude the operator and Criteria2 then i see a different set of results that should be included but arent.