how do I change a hyperlink to text

G

Guest

I have a long column of hyperlinks in an excel file. I need to copy the full
addresses as text into an adjacent column. I can do this line by line thru
Edit Hyperlink Ctrl C / Ctrl V, but this is too tedious. Tried to record my
steps to a macro but macro completely ignored my steps!
Thank you
 
N

Norman Jones

Hi Mmhoballah,

Try::

'=============>>
Public Sub TesterB01()
Dim rng As Range
Dim HL As Hyperlink

Set rng = Activesheet.Range("J:J") '<<==== CHANGE

For Each HL In rng.Hyperlinks
HL.Parent.Offset(0, 1).Value = HL.Address

Next HL

End Sub
'<<=============
 
G

Guest

worked like a charm, many thanks

Norman Jones said:
Hi Mmhoballah,

Try::

'=============>>
Public Sub TesterB01()
Dim rng As Range
Dim HL As Hyperlink

Set rng = Activesheet.Range("J:J") '<<==== CHANGE

For Each HL In rng.Hyperlinks
HL.Parent.Offset(0, 1).Value = HL.Address

Next HL

End Sub
'<<=============
 
G

Guest

This works great for me too. I'm trying to copy the hyperlinks from one excel
document to another.

Using this I've converted the hyperlinks to filepaths. Now, I want to
convert the column of filepaths back to hyperlinks.

Also, I want to display only the filenames.

Regards
Dylan Dawson
Scotland
 

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