Hyperlink with a relitive reference.

Copper Contributor

I have a worksheet ('mysheet')  that contains a link to a cell in the same sheet. I need to make a copy ('mysheet (1)' )  When I do, the link takes me back to the reference in the original worksheet ('mysheet'). I want it to adjust each time I make a copy and take me to the same cell in the sheet I have copied. Is this possible?

2 Replies
I'm not sure how or if it can be done through the normal excel dialog as it adds the worksheet reference to the cell address, but it appears to work if you do it using vba.

If you copy/paste this macro into a module and run it, then it would add a link to the active cell. Change the cell address and text to display.

Sub Macro2()
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection, _
Address:="", _
SubAddress:="A2", _
TextToDisplay:="LINK"
End Sub


I was hoping to do it without macros, But thank you for this response. I will try it.