Apply filter using more than two wildcards

Tejas Kore

Board Regular
Joined
Nov 2, 2017
Messages
72
Office Version
  1. 365
Platform
  1. Windows
Hi Friends,

Linux = Array("*Linux*", "*Solaris*", "*Sun OS*")
d.Add "WindowsOS", WindowsOS
d.Add "Linux", Linux
.
.
.
.
ActiveSheet.Columns.AutoFilter field:=Columns(vcolumn).Column, Criteria1:=d.Items()(i), Operator:=xlFilterValues

As u all know here d.Items()(i) will be Array("*Linux*", "*Solaris*", "*Sun OS*").

I am trying to apply filter based on more than two wildcards but it seems that u cannot do that. I ran the code and it gave blank sheet .

Do we have any other alternative method to do this ?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
it might be better if you made a pretend spreadsheet then asked how best to filter it - I personally have no idea what d.add is....
 
Upvote 0
Hi oldbrewer,

Here 'd' is a dictionary where key is a string which I have used to rename file and item is a array of multiple wildcards(specially more than 2 wildcards).
Due to some constraints , I didn't paste the whole code. I shoudn't have pasted first 3-4 lines.

I wanted to know in the below line what changes need to be made so that we can add more than 2 wildcards.

ActiveSheet.Columns.AutoFilter field:=Columns(vcolumn).Column, Criteria1:=d.Items()(i), Operator:=xlFilterValues

'''''d.items()(i)=Array("*Linux*", "*Solaris*", "*Sun OS*")

 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top