HYPERLINK(url,name)

  • Thread starter Thread starter bonejn
  • Start date Start date
B

bonejn

Is there a function that reverses the process? I'm just not finding it in excel help.
I'm trying to extract the url and name from a pasted hyperlink and put those values adjacent
columns.

tia,

-Brad
 
You can use a User Defined Function to extract the URL. For example:

Function HLink(rng As Range)
'extract URL from hyperlink
'posted by David McRitchie
On Error Resume Next
HLink = rng.Hyperlinks(1).Address
If HLink = 0 Then HLink = ""
End Function

If you store this in Personal.xls, and want to return information about
a hyperlink in cell B2, the formula would be:

=PERSONAL.xls!HLink(B2)

To return the name, refer to the cell which contains the hyperlink:
=B2
 
Thanks Debra and Dave!
Both routines work great =)
You've just saved me soooo much time!!
-Brad
 
Back
Top