0
How to get the underlying hyperlink address in excel
Needed this today and I know I’m on the only one who will :) Thanks to ozgrid.com for the hookup. “The hookup”, that was so 90′s wasn’t it!
The Code
Function GetAddress(HyperlinkCell As Range)
GetAddress = Replace(HyperlinkCell.Hyperlinks(1).Address, "mailto:", "")
End Function
To use this UDF push Alt+F11 and go Insert>Module and paste in the code. Push Alt+Q and save. The Function will appear under “User Defined” in the Paste Function dialog box (Shift+F3). Use the Function in any cell as shown below.
=GetAddress(A1)
Where cell A1 has a Hyperlink within it.