Feb 4, 2007 #1 BigInch Petroleum Joined Jun 21, 2006 Messages 15,161 Location GB Looking for a way to extract the URL from an XL cell (cell is typically displaying a link as an underlined name). Thanks. BigInch-born in the trenches. http://virtualpipeline.spaces.msn.com
Looking for a way to extract the URL from an XL cell (cell is typically displaying a link as an underlined name). Thanks. BigInch-born in the trenches. http://virtualpipeline.spaces.msn.com
Feb 4, 2007 1 #2 IRstuff Aerospace Joined Jun 3, 2002 Messages 44,899 Location US 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 Upvote 0 Downvote
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
Feb 4, 2007 Thread starter #3 BigInch Petroleum Joined Jun 21, 2006 Messages 15,161 Location GB Xllent! Thanks IRStuff. BigInch-born in the trenches. http://virtualpipeline.spaces.msn.com Upvote 0 Downvote
Feb 5, 2007 #4 joerd Chemical Joined Sep 27, 2002 Messages 531 Location US 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. Upvote 0 Downvote
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.