this snippet of code is fully functional within the Sub. ("lr" is already dimmed and returns LastRow)
now i need to do the same type of Autofilter on a different column with three possible criteria, and each of the criteria must end with a wildcard because the last character can be different.
so, I need to:
' Hide all rows not equal to "SEE*" OR "DEE*" OR "MMM*" (where the "*" is wildcard)
here's what I have tried:
(the rest of the code to make this functional already works)
I Need to know how to get that "not equal to" working with an Array, and if using wildcards inside an Array like this will work.
any help would be appreciated.
Code:
' Hide all rows not equal to "NoGood"
Columns("H:H").AutoFilter
ActiveSheet.Range("$H$1:$H$" & lr).AutoFilter Field:=1, Criteria1:="<>" & "NoGood"
now i need to do the same type of Autofilter on a different column with three possible criteria, and each of the criteria must end with a wildcard because the last character can be different.
so, I need to:
' Hide all rows not equal to "SEE*" OR "DEE*" OR "MMM*" (where the "*" is wildcard)
here's what I have tried:
(the rest of the code to make this functional already works)
Code:
Dim MyArray as Variant
MyArray = Array("SEE*", "DEE*", "MMM*")
Columns("D:D").AutoFilter
'The following line is INCORRECT, but shows what I am attempting to do:
ActiveSheet.Range("$D$1:$D$" & lr).AutoFilter Field:=1, Criteria1:=Array("<>" & MyArray)
I Need to know how to get that "not equal to" working with an Array, and if using wildcards inside an Array like this will work.
any help would be appreciated.