Hyperlink Target Extraction to a new Cell

ken2002

New Member
Joined
Oct 7, 2002
Messages
3
I've a File with Customer Contact Info, which has a Name and an Mail to Address attached to it. I want to Extract this Email Address and Copy it to a new Adjacent Cell. Example Bill Gates is the Contact Name and As you Click the Hyperlink, the email Program opens with the Address bgates@microsoft.com. I can certainly do one at a time but I've a Contact DB with 6K Addresses. Any help would be apprecited. Tried MS Site but no luck. Please Help!!!!!!!!!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome KEN,
Let us know the layout of your data worksheet as follows.
Book1.xls
ABCD
1NameEmailnewAdjacentCell
2BillGates1bgates1@microsoft.com
3SteveJobs1Steve1@Apple.com
4BillGates2bgates2@microsoft.com
5SteveJobs2Steve2@Apple.com
6BillGates3bgates3@microsoft.com
7SteveJobs3Steve3@Apple.com
8BillGates4bgates4@microsoft.com
9SteveJobs4Steve4@Apple.com
10BillGates5bgates5@microsoft.com
11SteveJobs5Steve5@Apple.com
12BillGates6bgates6@microsoft.com
13SteveJobs6Steve6@Apple.com
14BillGates7bgates7@microsoft.com
15SteveJobs7Steve7@Apple.com
16BillGates8bgates8@microsoft.com
17SteveJobs8Steve8@Apple.com
18BillGates9bgates9@microsoft.com
19SteveJobs9Steve9@Apple.com
20BillGates10bgates10@microsoft.com
Sheet1
 
Upvote 0
I don't know how to post the spreadsheet with the HTML Converter. But here is the Example
Col A Col B Col C
Company Contact Extracted Email Address

Microsoft Bill Gates

need to extract the attached Email Address created using the hyperlink Mail to Function
Bgates@microsoft.com is entered using the hyperlink function.

Hope you understand this.
 
Upvote 0
Hi please try this one.<PRE><FONT color=red>Sub</FONT>GetEmailAddress()<FONT color=#339966>'Put this code on STD module</FONT><FONT color=red>Dim</FONT>rngData<FONT color=red>As</FONT> Range, rng<FONT color=red>As</FONT> Range<FONT color=red>With</FONT>Sheets("Sheet1")<FONT color=#339966>'Change here to name of data worksheet.</FONT><FONT color=red>Set</FONT>rngData = .Range(.[B2], [B65536].End(xlUp))<FONT color=red>End With</FONT><FONT color=red>On Error</FONT><FONT color=red>Resume</FONT>Next<FONT color=red>For</FONT>Each rng In rngData

rng.Offset(, 1).Value = Mid(rng.Hyperlinks(1).Address, 8)

Next<FONT color=red>End Sub</FONT></PRE>
This message was edited by Colo on 2002-10-09 01:26
 
Upvote 0
KEN, I sent an email with Workbook. :biggrin:
 
Upvote 0
Thank you very much for your help "Colo". The Code worked like a Charm and I'm already using it to create my new DB. This Forum is just Great. Thanks again for all you help.
 
Upvote 0

Forum statistics

Threads
1,202,984
Messages
6,052,910
Members
444,612
Latest member
FajnaAli

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