I have a list of names (3000) with hypertext link on name to an email.
I would like to retrieve the emails to separate table cell
I have a list of names (3000) with hypertext link on name to an email.
I would like to retrieve the emails to separate table cell
With
A1: containing a hyperlink.....eg http://www.google.com/ (displayed as: Google)
• ALT+F11.....to open the Visual Basic Editor
• Right-click on your workbook name in the VBA Project panel
...Insert: Module
• Copy the below VBA code and paste it into that module:
Using that function in your workbook...![]()
Function GetHlinkAddr(rngHlinkCell As Range) Dim sFormula As String With rngHlinkCell If .Hyperlinks.Count Then GetHlinkAddr = .Hyperlinks(1).Address ElseIf .HasFormula Then sFormula = .Formula If InStr(1, sFormula, "HYPERLINK") > 0 Then GetHlinkAddr = Split(sFormula, Chr(34))(1) Else GetHlinkAddr = "No Hyperlink" End If End If End With End Function
This formula returns the URL referenced by that hyperlink:
In the above example, the formula returns: http://www.google.com/![]()
B1: =gethlinkaddress(A1)
Note: XL2007 and later
When you save that workbook, you'll need to save it as a Macro Enabled (.xlsm) workbook.
Is that something you can work with?
Many thanks for your prompt reply
I tried and could not make your offer.
I am attaching a file with the names (in Hebrew), including e-mail link.
I would be happy if you could do what you've written
https://onedrive.live.com/redir?resi...nt=file%2cxlsx
On-Line Excel does not support VBA at this time.
You'd need to use an off-line Excel file.
Many thanks Ron
Managed in accordance with your suggestion.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks