[Solved] Hyperlink to location specified in a cell

Discuss the spreadsheet application
Post Reply
imacanuck
Posts: 32
Joined: Sun Aug 07, 2011 2:44 am

[Solved] Hyperlink to location specified in a cell

Post by imacanuck »

Good day.

Using the formula below:

=HYPERLINK("#Steel Sections.T2";"Go To")

Cell T2 currently contains the text "M45" which is to represent cell M45. The contents of cell T2 changes depending on the text entered into cell Q2. Is it possible to have the hyperlink go to cell M45 (or whichever cell the contents of cell T2 represents) rather than going to cell T2 and then repeat if the text in cell Q2 has been changed?

Thanks.
Last edited by MrProgrammer on Wed Dec 14, 2022 5:11 am, edited 2 times in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
AO4.1.13 / LO7.3.7.2 / Win 10
User avatar
Lupp
Volunteer
Posts: 3761
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Hyperlink within document

Post by Lupp »

The sequence of characters behind the leadsing # must be the actual address of the target cell (or range). If a part of that address is given in a cell, it can be -and needs to be- concatenated with the other partzs in the same way as any cocatenation is done.

Code: Select all

=HYPERLINK("#Steel_Sections." & T2;"Jump To: " & "Steel_Sections." & T2)
should do what you want.
BTW: I will only give examples with sheet names neither containing spaces nor special characters. These are sometimes creating problems.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
imacanuck
Posts: 32
Joined: Sun Aug 07, 2011 2:44 am

Re: Hyperlink within document

Post by imacanuck »

Works perfectly, thank you Lupp.
AO4.1.13 / LO7.3.7.2 / Win 10
Post Reply