Insert a link with a dynamic Cell Reference

fapb48

Board Regular
Joined
Sep 13, 2020
Messages
65
Office Version
  1. 365
Platform
  1. Windows
Hi,

Is there a way to add a dynamic link on excel?

lets say i had a link on B1.. and clicking on B1 it points me to a cell on a table in another sheet within the same worksheet, lets say B10..

But when that table gets sorted and the content on that B10 cell gets moved to another row i want that link to still point at the actual content and not to B10.

Hopefully it makes sense.

Thanks
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Assuming that the table is in Sheet2 and the column you are interested in is Column B, and you want the hyperlink to point to the value in Column A of the same row, you can use the following formula:

Excel Formula:
=HYPERLINK("#Sheet2!"&ADDRESS(MATCH(B1,Sheet2!B:B,0),1),INDEX(Sheet2!A:A,MATCH(B1,Sheet2!B:B,0)))

This formula uses the MATCH function to find the row number of the cell containing the value in B1 within Column B of Sheet2. The ADDRESS function then uses this row number to create a reference to the cell in Column A of the same row. Finally, the INDEX function returns the value in that cell.

When you click on the hyperlink in cell B1, it will take you to the correct cell in Sheet2, regardless of its position within the table.
 
Upvote 0
Assuming that the table is in Sheet2 and the column you are interested in is Column B, and you want the hyperlink to point to the value in Column A of the same row, you can use the following formula:

Excel Formula:
=HYPERLINK("#Sheet2!"&ADDRESS(MATCH(B1,Sheet2!B:B,0),1),INDEX(Sheet2!A:A,MATCH(B1,Sheet2!B:B,0)))

This formula uses the MATCH function to find the row number of the cell containing the value in B1 within Column B of Sheet2. The ADDRESS function then uses this row number to create a reference to the cell in Column A of the same row. Finally, the INDEX function returns the value in that cell.

When you click on the hyperlink in cell B1, it will take you to the correct cell in Sheet2, regardless of its position within the table.
This is great, thank you.

Altough, i forgot to mention a little (big) detail.

I want to be able to insert this type of link on an image/icon and then when i click on the image it points me to that dynamic cell.

Really sorry i wasnt very explicit first time...
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,112
Members
452,302
Latest member
TaMere

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