Excel VBA - Filter List (with Intentional Duplicate Values) by Another List

Hello,

I have a Sheet named "Contacts" that has two columns: "Entity Name" and "Contact Name". There will be multiple contacts per entity, so the entity name will repeat itself occasionally.

I have another Sheet named "VIP Entities" that has one column: "Entity VIP Name". There will be no duplicates in this list.

I want to be able to filter the "Entity Name" column on "Contacts" by the '"Entity VIP Name" column on "VIP Entities".

For example, if the "Entity Name" column on the "Contacts" Sheet shows:

Entity Name:           Contact Name:
ABC Corporation    Joe Shmoe
ABC Corporation    Jane Doe
DBA Company        That Guy
DBA Company        This Guy
DBA Company        Please Not This Guy
C&A LLC                  This Girl
C&A LLC                  This Gal

Open in new window


AND the "Entity VIP Name" column on the "VIP Entities" Sheet shows:

VIP Entity Name:
ABC Company
DBA Company

Open in new window


THEN the VBA Script would filter the "Entity Name" on the "Contacts" Sheet to show ONLY:

Entity Name:           Contact Name:
ABC Corporation    Joe Shmoe
ABC Corporation    Jane Doe
DBA Company        That Guy
DBA Company        This Guy
DBA Company        Please Not This Guy

Open in new window

EnigmaMatterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongCommented:
you can create a column in Contacts worksheet with the VLOOKUP formula:

=IF(IFERROR(VLOOKUP(A2,'VIP Entities'!A:A,1,FALSE),"@@@")="@@@","No","Yes")
28700877.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan ChongCommented:
and then filter that column accordingly.
0
EnigmaMatterAuthor Commented:
I overthought this.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.