Remove emails from selected column if they appear in a chosen tab.

We use Excel 2013 and need some code that will remove emails from selected column if they appear in a chosen tab.

1. Click on column with email addresses and run the 'Scrub against Blacklist' code.  
2. This shall prompt for the tab with the bad email addresses to be chosen.
3. Once run, the rows on which the bad email addresses appear will be removed.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

ProfessorJimJamMicrosoft Excel ExpertCommented:
what is the sheet name where the emails to be removed from?  what is the column in which the clean up to be done?

in sheet bad email address, what is the column in which the bad email addresses are located?

can you upload a sample file?
frugalmuleAuthor Commented:
It should request for those to be selected
ProfessorJimJamMicrosoft Excel ExpertCommented:
please find attached.

simple run the macro of "ScrubagainstBlacklist"  it will delete all of the emails in "Whitelisttobecleaned" Column A which is found in "BlackList" column B of Bad emails.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

frugalmuleAuthor Commented:
Thanks, but doesn't meeet request.  Columns and tabs cannot be predefined.
ProfessorJimJamMicrosoft Excel ExpertCommented:
You can pre define them, open the workbook press alt f11 then click on module1

You can see the code there

You can change the sheet name and column name from there
frugalmuleAuthor Commented:
My code repository system doesn't allow me to save the file, only the code, which is why it is necessary that it function the way I intended where the code itself prompts me to select the column, of emails, and select the tab the contains the blacklist.
ProfessorJimJamMicrosoft Excel ExpertCommented:
Ok. if you insist with the inputbox option, here it is attached.

download the attached file. and then press in Keyboard Control + k and the macro will run and it will ask you to select the first cell of whitecell column and so you click on the whatever column of your sheet that has your whitelist emails and then it will ask you for the badlist , so select the first cell of whatever column and sheet that has your badlist of emails once you did that then you will see that whitelist will be automatically cleaned from the values that were found in badlist.

I tested it and it works perfectly.

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
frugalmuleAuthor Commented:
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.