Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

extract XL cell's hyperlink 1

Status
Not open for further replies.

BigInch

Petroleum
Jun 21, 2006
15,161
Looking for a way to extract the URL from an XL cell (cell is typically displaying a link as an underlined name).

Thanks.



BigInch[worm]-born in the trenches.
 
Replies continue below

Recommended for you

Excel's spreadsheet functions don't appear to support finding hyperlinks, but Visual Basic does recognize a hyperlink.

Something like this:
For Each h In Worksheets(1).Hyperlinks
test = h.Address
Next


TTFN



 
It works on a range argument, too:
Code:
Function GetHyperlink(R As Range) As Variant
    GetHyperlink = R.Hyperlinks(1).Address
End Function
can be called as [tt]=GetHyperlink(A1)[/tt] (for example), which gives you the hyperlink address in cell A1.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor