Hey All! I've been searching the forums in vain and am hoping someone out there can help. I have a dynamic named range ("FilterCriteria") and am trying to use it as an array for autofilter. I'd like to see if any of the "FilterCriteria" values appear in each cell in Column H. H is a helper column that is concatenating multiple other columns, as my filter variables exist in several different columns. I can't seem to get the below code to work, and imagine there might even be a better way?
Thank you so much!
Thank you so much!
Code:
Sub RunFilter_New()
Dim vCrit As Variant
'Need Help: Trying to see if any value in my "FilterCriteria" named range
'appears in Column H on "Data" worksheet (by row)
'I'm using H as a helper column since my filter criteria span multiple columns (A, E, F, G)
'If it appears in the H cell - in any part of the cell, autofilter those rows
'If the value does not appear in the H cell, hide that row
vCrit = Worksheets("KEEP-unique").Range("FilterCriteria").Value
Worksheets("Data").Range("$A$4").CurrentRegion.AutoFilter _
Field:=8, _
Criteria1:="*" & Application.Transpose(vCrit) & "*", _
Operator:=xlFilterValues
End Sub