Hyperlink to cell in sheet based off of list of values

gaudrco

Board Regular
Joined
Aug 16, 2019
Messages
203
Hi,

I am tying to find a way to create a hyperlink that goes to a specific cell in my sheet. I want the hyperlink to be dynamic and change based off a data validation list of values.

For example:

Cell B2 contains my list of values, so in B3 I would like toinput a formula that says when B2=”Apple”, then hyperlink to cell D6, when B2=”Banana”,hyperlink to cell D57 and so on…

Any ideas on how to achieve this?

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
when B2=”Apple”, then hyperlink to cell D6, when B2=”Banana”,hyperlink to cell D57 and so on…

Hi, how do we know that "apple" links to cell D6 and "banana" links to cell D57 - what is the logic? Are those values in the cells you want to link to?
 
Last edited:
Upvote 0
The point of what I am trying to accomplish is a simple way to navigate my spreadsheet.

My spreadsheet has many rows so the logic is if I choose ‘Apples’in the dropdown list of values in cell B2, then cell B3 will dynamically changeto become a hyperlink that will direct me the cell in my spreadsheet that hasto do with Apples, which happens to be D6. Likewise, if I decide to change B2to “Bananas” then B3 will change to the hyperlink that directs me to the cellin my spreadsheet that has to do with Bananas, which happens to be D57.



I tried a formula that looked like this but I got an errorthat said “Can’t open specified file”


This formula is located in cell B3



=IF($B$2="Apple",HYPERLINK(D6),IF($B$2="Banana",'HYPERLINK(D57)))

 
Upvote 0
Hi, I understand what you are trying to do - I'm asking if there is a way to logically determine that apple links to cell D6 and bananas links to D57?

If there is no logic, I'd suggest you create a list of the drop down values and the cell you want each to link to (cells E2:F4) in the example below and try like this:


Excel 2013/2016
BCDEF
1DropdownLinkFruitLink Cell
2appleClick here..AppleD6
3BananaD57
4PearD88
Sheet1
Cell Formulas
RangeFormula
C2=HYPERLINK("#"&VLOOKUP(B2,$E$2:$F$4,2,0),"Click here..")
 
Upvote 0
If you really wanted to hard code the values and cell references in the formula, you could try like this.

=HYPERLINK("#"&CHOOSE(MATCH(B2,{"apple","banana","pear"}),"D6","D57","D88"),"Click here..")
 
Upvote 0
I tried both methods and they both work! I prefer the hard coded method so that is what I went with. Thank you very much for you help!
 
Upvote 0
I prefer the hard coded method so that is what I went with.

Great, although I missed the match_type parameter of the match() function - for robustness you should include the addition in red below:

=HYPERLINK("#"&CHOOSE(MATCH(B2,{"apple","banana","pear"},0),"D6","D57","D88"),"Click here..")
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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