Thread: URL function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.links,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default URL function

Try this User Defined Function:

Function hyp(r As Range) As String
hyp = ""
If r.Hyperlinks.Count 0 Then
hyp = r.Hyperlinks(1).Address
Exit Function
End If
If r.HasFormula Then
rf = r.Formula
dq = Chr(34)
If InStr(rf, dq) = 0 Then
Else
hyp = Split(r.Formula, dq)(1)
End If
End If
End Function

Should work for both Inserted hyperlinks and hyperlinks entered with the
=HYPERLINK() function.
--
Gary''s Student - gsnu200858


"JoJo" wrote:

Folks:


In column #1 of my spreadsheet, I have a list of hyperlinks. When I hold my
mouse over these links, the URL (or email address) associated with these
links would show up.

* Is there an Excel function (or keyboard combination) that I can use to
copy the URL (or email address) associated with my links to column #2 ?


Thanks,
JoJo