How to extract a web address from a hyperlink cell?
Use this tiny UDF:
Function hyp(r As Range) As String
Dim s As String
If r.HasFormula Then
s = r.Formula
s_array = Split(s, Chr(34))
hyp = s_array(1)
Else
hyp = r.Hyperlinks(1).Address
End If
End Function
for example =hyp(A1)
This will work if either the hyperlink was inserted directly or via the
=HYPERLINK() function.
--
Gary's Student
"El Rebelde" wrote:
I hava column of data that shows "friendly" website names. I want to extract
the actual website URLs that are embedded in the data. Anyone know how?
|