Filter using vba - exclude more than three criteria

thomsonreuters

New Member
Joined
Dec 9, 2017
Messages
26
Hi Experts,

i want to DO auto filter without following text "CN", "KR", DE", "EP", :GB", "JP", "US", "WO", "FR" USING vba SCRIPT....i tried with below code but it does not work....Please could anyone help on this...

Selection.AutoFilter Field:=5, Criteria1:="<>CN", Criteria2:="<>KR", Criteria3:="<>DE", Criteria4:="<>EP", Criteria5:="<>GB", Criteria6:="<>JP", Criteria7:="<>US", Criteria8:="<>WO", Criteria9:="<>FR", Operator:=xlFilterValues


Thanks
JP
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
You are limited to two criteria, unless doing an exact match.
You could put a formula in a blank column that returns (for example) True or False depending on whether the row should be visible or not & filter on that.
 
Upvote 0
You are limited to two criteria, unless doing an exact match.
You could put a formula in a blank column that returns (for example) True or False depending on whether the row should be visible or not & filter on that.

Thanks much.

JP
 
Upvote 0

Forum statistics

Threads
1,215,646
Messages
6,126,004
Members
449,279
Latest member
Faraz5023

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