Get the URL from a hyperlink in Excel

To install this all you need to do is:

1.Hit ALT + F11 (Opens Visual Basic Editor)
2.Click on Insert -> Module (adds a module to your excel file)
3.Paste the code below for the function of GETURL
4.Hit ALT + Q (Closes the Visual Basic Editor)

Now use the =GETURL(cell) to get the URL

Example: =GETURL(A1) will return the URL for the Hyperlink displayed in cell A1

Function GETURL(HyperlinkCell As Range)

 GETURL = HyperlinkCell.Hyperlinks(1).Address

End Function

Source: Bohack.com

Posted in VBA Snippets Tagged with: , , , ,