Avatar of joyacv2
joyacv2Flag for Puerto Rico

asked on 

MORE THAN ONE CRITERIA IN FILTERS USING VBA

Hi,

How i modify the criteria in the range.autofilter in vba.

For example:

I have a column and i want to filter for the fields that contains "Michelle or Jessica or Wanda" and another column that contains in a cell two texts (ex: the car is blue) so the filter can find that the cells contains car and blue, so the filter present all the cells that contains car and blue in the same cell. Any idea?
Microsoft Excel

Avatar of undefined
Last Comment
normajm400
ASKER CERTIFIED SOLUTION
Avatar of Harry Lee
Harry Lee
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of byundt
byundt
Flag of United States of America image

HarryHYLee,
Nicely done!

Brad
Avatar of joyacv2
joyacv2
Flag of Puerto Rico image

ASKER

perfect code, i make a little modifications to use in my code
Avatar of Harry Lee
Harry Lee
Flag of Canada image

Glad I can help.
Avatar of normajm400
normajm400
Flag of United States of America image

If you are using Excel 2007 or better, convert the data to a table using the "Format as Table" option on the ribbon.  Tables allow for multiple column filters.
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo