View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Hyde Bob Hyde is offline
external usenet poster
 
Posts: 2
Default Hyperlink from the web

Hi Gary,

Thankyou so much. It works a treat!

Regards,

Bob.


"Gary''s Student" wrote in message
...
If a hyperlink is in A1, then =hyp(A1) :

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

will display the url.
--
Gary''s Student - gsnu200802


"Bob Hyde" wrote:

Hi,

I have copied a number of hyperlinks from the web into a table and I need
to
extract the web address from the copied cell.
How do you do this please?

Regards,

Bob