Multiple Autofileter in Excel macro

bpy2012

New Member
Joined
Mar 26, 2016
Messages
1
Hi Team,

I use to run a report daily of my clients. Hence i am trying to create a Macro for the same. While creating i face some difficulty.

My data includes Name of clients in 1 coloumn and there comments in 2 coloumn and so on...

I want macro to search a specific word for example "Good", "Bad", "Average" and so on from the coloumn "Comments".
But i am unable to provide the Autofilter criteria more than 2. Hence please advise me what will be the VBA code for macro where i can provide multiple autofilter words.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You can use an array to if you have multiple criteria. Something like this, where Field 2 contains the comments:

Code:
ActiveSheet.Range("$A$1").CurrentRegion.AutoFilter Field:=2, Criteria1:=Array("Good", "Bad", "Average"),Operator:=xlFilterValues
You may need to add wildcards if your criteria key words are part of longer strings.
 
Upvote 0

Forum statistics

Threads
1,215,578
Messages
6,125,642
Members
449,245
Latest member
PatrickL

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