So I need to use vba to autofilter a column, so that it filters cells that contain any of the following strings: KOM, SRR, PDR, CDR. Ive tried the following but it only works with 2 search criteria:
ActiveSheet.ListObjects("Table_Query_from_smt").Range.AutoFilter Field:=7, _
Criteria1:="*KOM*", Operator:=xlOr, Criteria2:="*SRR*"
And I've also tried using an array:
ActiveSheet.ListObjects("Table_Query_from_smt").Range.AutoFilter Field:=7, _
Criteria1:=Array("*SRR*", "*KOM*") Operator:=xlFilterValues
But this method only selects the last string in the array.
Does anyone know a different method to do this? Thanks in advance
ActiveSheet.ListObjects("Table_Query_from_smt").Range.AutoFilter Field:=7, _
Criteria1:="*KOM*", Operator:=xlOr, Criteria2:="*SRR*"
And I've also tried using an array:
ActiveSheet.ListObjects("Table_Query_from_smt").Range.AutoFilter Field:=7, _
Criteria1:=Array("*SRR*", "*KOM*") Operator:=xlFilterValues
But this method only selects the last string in the array.
Does anyone know a different method to do this? Thanks in advance