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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

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