I'm trying to edit my VBA code to filter for multiple values (which already exist in my worksheet) and for partial matches to also be filtered. This is my current code:
ActiveSheet.Range("$A$6:$AB$9903").AutoFilter Field:=15, Criteria1:=Array( _
"Desktop", "Monitor", "Non-Standard Desktop", _
"Non-Standard Notebook", "Notebook"), Operator:=xlFilterValues
I would like to add in another criteria, like anything that contains the word "Headset". I tried adding in * Headset* to the array above but it did not work. I also tried creating a new chunk of code for just words containing 'Headset', and while it did filter for those cells, it only filtered for those.
I'm not really sure what other options I have. I checked other people's solutions but it looks like in their solutions, they're doing what I did above (filtering only for words containing that specific string). Any advice? Thanks!
Using AdvancedFilter When Many Criteria With Wild Characters
You can use the following...
... if you use the range
AD6:AD12
filled with the following:... where you will replace
COL15
with the header inO6
. You will enter the values e.g. like this:="=Monitor"
or'=Monitor
.