Hyperlink path into a adjacent cell

  • Thread starter Thread starter DARREN FONG via OfficeKB.com
  • Start date Start date
D

DARREN FONG via OfficeKB.com

Hi,

I have a list of cells with hyperlinks displaying amounts i.e. $100, $200 etc,
what I want to do is display the path of the hyperlink next to the amounts.
as I need to use part the path to do other work.

Thanks a lot,
Darren Fong
 
Hello Darren,

Here is a macro that will that will list the link address of all
hyperlinks on the active worksheet. The hyperlink address is placed in
the cell immediately to the right of the hyperlink.


Code:
--------------------
Sub ListLinkAddresses()

Dim Addx, HypLnk

With ActiveSheet
For Each HypLnk In .Hyperlinks
Addx = .Range(HypLnk.Range.Address).Offset(0, 1).Address
.Range(Addx).Value = HypLnk.Address
Next HypLnk
End With

End Sub
 
Back
Top