There are multiple rows in my excel with D column as: TDM - 02 Bundle Rehoming 5 NE, TDM - 02 Bundle Rehoming 23 NE, IP - 02 Bundle Rehoming 7 NE etc. Please note that the number of NEs are different at most of the places. I want to search a substring to auto filter in Excel VBA:
sht2.Select
sht2.Activate
If sht2.FilterMode Then
sht2.ShowAllData
End If
sht2.Range("D1:D" & LastRow).AutoFilter Field:=4, Criteria1:=Array( _
CStr("HYBRID ATM and IP - 02 Bundle Rehoming" & Chr(42)), _
CStr("TDM - 02 Bundle Rehoming" & Chr(42)), _
CStr("IP - 02 Bundle Rehoming" & Chr(42))), Operator:=xlFilterValues
However, This won't produce any results. There is no error generated but the results are empty rows.
I tried various other options such as "HYBRID ATM and IP - 02 Bundle Rehoming **" etc but without any success.
Is there any way to auto-filter these substrings with having a variable ending.