![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: India
Posts: 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 |
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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 |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Location: India
Posts: 4
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|