Hyperlink to be extracted

Niranjan

New Member
Joined
Mar 15, 2002
Messages
4
Hi
I have a file where cloumn A contains list of names of various companies and they are hyperlinked so when you click them the company website opens. I want to copy only the links/urls to another column. Can anybody help me.
Niranjan
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi Niranjan

If they were created via the HYPERLINK Function within Excel you maybe able to use the samee function to 'reverse it, so to speak.

To cover bases though, this should get them from column A into Column C


Sub GetAddress()
Dim rCells As Range
On Error Resume Next
For Each rCells In Range("C1", Range("A65536").End _
(xlUp).Offset(0, 2))
rCells = rCells.Offset(0, -2).Hyperlinks(1).Address
Next
On Error GoTo 0
End Sub
 
Upvote 0
Hi Dave
Thanks for your help.
The Macro code worked perfectly and saved me a lot of time. Though i could'nt clearly understand the code logic.
Thanks a million
Sincerely
Niranjan
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top