Referring to a hyperlink
Take you hyperlink apart into two parts and then use the hyperlink() function:
First enter this tiny UDF:
Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function
This function will return the URL or target of the hyperlink.
If your hyperlink is in A1 then in B1 put =A1 gets you the friendly name
in C1 put =hyp2(A1) gets you the URL or target
in D1 put =HYPERLINK(C1,B1) this gives you the hyperlink as a function.
--
Gary's Student
" wrote:
I have a cell that has a hyperlink added to it via CTRL-K.
Is there a way for the hyperlink function to grab that info? As opposed
to having a path stored in a cell, I have a "friendly name" in there
with ctrl-k'd hyperlinks. I know how to use hyperlink if my target cell
contains a path name in clear text, just not the other way.
Hope I'm clear.
|