Hyperlink from the web

  • Thread starter Thread starter Bob Hyde
  • Start date Start date
B

Bob Hyde

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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top