Match Emails to URLs

Sharid

Well-known Member
Joined
Apr 22, 2007
Messages
1,064
Office Version
  1. 2016
Platform
  1. Windows
I have a list of emails, I need to link them to the correct URLs. Problem is there are too many to do manual.

I was hoping for some vba code that would MATCH part of the string in the EMAIL to that of the URL and place it in the next column/s

Example
Sheet1 column A has all the urls

URLs
http://www.Whatcar.co.uk
http://www.Autotrader.co.uk
http://www.CarGURU.co.uk
http://www.Automart.co.uk
http://www.MotorWorld.co.uk

<tbody>
</tbody>


Sheet2 Column A has all the Emails

Emails
JohnDoe@whatcar.co.uk
JoeBlogs@MotorMadness.co.uk
JaneBlogs@MotorMadness.co.uk
JaneBlogs@MotorWorld.co.uk
JaneDoe@Whatcar.com
Info@Autotrader.co.uk
JaneDoe@BillysCars.co.uk
Contact@CarGuru.co.uk
Bill@MedicalGuru.co.uk
Jane@LifeStyleGuru.co.uk
Info@Martfury.co.uk
Info@AutoMart.co.uk

<tbody>
</tbody>
When the code is run it will link the Emails from Sheet2 to that of the URLs on Sheet 1. I understand that this may not work 100% correct,however it will link the bulk of the emails.

Some emails may have a simmilar string to that of the url, the second email goes into the next column, I can then look at these few individually.

So it will look like this when the codes is run


URLS
http://www.Whatcar.co.uk
JohnDoe@whatcar.co.ukJaneDoe@Whatcar.com
http://www.Autotrader.co.uk
Info@Autotrader.co.uk
http://www.CarGURU.co.uk
Contact@CarGuru.co.ukBill@MedicalGuru.co.ukJane@LifeStyleGuru.co.uk
http://www.Automart.co.uk
Info@AutoMart.co.ukInfo@Martfury.co.uk
http://www.MotorWorld.co.uk
JaneBlogs@MotorWorld.co.ukJaneBlogs@MotorMadness.co.ukJoeBlogs@MotorMadness.co.uk

<tbody>
</tbody>

IF POSSIBLE, the closest email MATCH to the url needs to go into column B Sheet1,

Any UNMATCHED EMAILS in Sheet2 are then highlighted in RED. This is because although I might have the URLs some emails are either Gmail, Yahoo, Hotmail etc. I can then look at these one at a time

Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi

Can anybody help on this, I am really stuck

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,794
Members
449,048
Latest member
greyangel23

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