Extract Hyperlinks

G

Guest

I have a spreadsheet with hundreds of hyperlinks - all in the same column.
All of the hyperlinks have friendly names (i.e. the cell shows "Microsoft"
with a hyperlink of www.microsoft.com)

Problem is the spreadsheet now needs to be saved as a text file for import
into another application - the actual addresses that the hyperlinks point to
are the critical information.

I need to remove the friendly name and leave the hyperlink.

A perfect world would leave the friendly name in one column and put the
hyperlink address in the next column.

Recomendations?
 
R

Ron de Bruin

Hi mtstream

Try this for the hyperlinks in column A
It will display the address in column B

Sub Test()
Dim hlnk As Hyperlink
For Each hlnk In Columns("A").Hyperlinks
hlnk.Parent.Offset(0, 1).Value = hlnk.Address
Next
End Sub
 
G

Guest

Thanks!

Ron de Bruin said:
Hi mtstream

Try this for the hyperlinks in column A
It will display the address in column B

Sub Test()
Dim hlnk As Hyperlink
For Each hlnk In Columns("A").Hyperlinks
hlnk.Parent.Offset(0, 1).Value = hlnk.Address
Next
End Sub
 

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

Top