Getting the URL from a Hyperlink Cell in Excel
If you’ve used Copy and Paste from a web page into Excel, you may end up with links in your Excel sheet. You can also add a URL to a cell.
So how do you access the URL itself? What if you want to modify the URL?
You can do it, even though there’s no built-in function for it in Excel. You have to create your own Function macro:
Function GetAddress(HyperlinkCell As Range)
GetAddress = HyperlinkCell.Hyperlinks(1).Address
End Function
To add this function to your spreadsheet:
Press Alt+F11 and select Insert>Module and paste the code snippet above. 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.
To use the actual function, type:
=getaddress(A1)
…where ‘A1′ is the cell that has the link you want to see.

Leave a Reply
You must be logged in to post a comment.