Pulling Embedded LInk Out of Cell

  • Thread starter Thread starter bobbabuoy
  • Start date Start date
B

bobbabuoy

I have a list of sites (ex-"Running Site") in an excel column that are
formatted as links (ie: a browser with a link opens when you click on
the cell). I want to write a macro that will pull the links out of the
cell and write them to a text file or an adjacent column. How can I do
that? I basically just need the line of code that will identify the
link that is embedded in the cell.

Thanks~
 
If A1 contains a hyperlink then

=hyp2(A1) will display the link

Enter this tiny UDF:

Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function
 

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