Conditional Hyperlinking

MikeG

Well-known Member
Joined
Jul 4, 2004
Messages
845
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have a one-column table, "Table A", which has product names in. Depending on the product that a user selects in that table, I would like to hyperlink to another table that has more details about the project.

There are 20 products and each of these has a seperate details table

What I would like in Table A is to add another column to the right and on each row it would say "Go To Details" then if the user clicks on this cell, they will be taken to the relevent product details table for the relevent product.

For example, cell A4 of Table A might contain Product D, so if the user clicks on cell B4, they will hyperlink to the details table for Product D.

One problem is that I cannot use a macro - the company the users work for won't allow VBA code.

Can a hyperlink be based on a "conditional" value?

Can anyone help?

Thanks,

MikeG
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Mike

You can use the Hyperlink() function to do the conditional hyperlinking.

Build a table with the values and respective hyperlinks addresses. In the formula in B use the table to look up the value in A to get the hyperlinks.
 
Upvote 0
Great! Thanks - I wasn't aware of that function.

Mike
 
Upvote 0
Actually, I can't seem to use the Hyperlink function to do what I want.

For example, Cell A6 of my Table A might have Product B, and I can see how to put a Hyperlink() formula in B6 that would jump to the detailed table for Product B. But on other occasions, Cell A6 might be "Product F" - so I would like Cell B6 to have a dynamic formula that will now go to the detailed table for Product F, without me having to change the B6 formula. i.e. more of a lookup type of thing than a hard-coded address.

Can this be done using the Hyperlink() function? Is there a work-around?

Thanks,

MikeG
 
Upvote 0
Like this:

<b>Excel 2003</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">AAA</td><td style=";">Link Address</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="font-weight: bold;;">Dropdown</td><td style="font-weight: bold;;">Link</td><td style="text-align: right;;"></td><td style=";">BBB</td><td style=";">Link Address</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style=";">AAA</td><td style="text-decoration: underline;color: #0000FF;;">Click for Details</td><td style="text-align: right;;"></td><td style=";">CCC</td><td style=";">Link Address</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet2</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B3</th><td style="text-align:left">=HYPERLINK(<font color="Blue">INDEX(<font color="Red">E:E,MATCH(<font color="Green">A3,D:D,0</font>),</font>),"Click for Details"</font>)</td></tr></tbody></table></td></tr></table><br />

Just change the "Link Address" to whatever link you want if that option is selected.
 
Upvote 0
Thanks Sal - I'm getting there.

Let's say that if the product is AAA, then I want the user to jump to Cell W6 in the current worksheet. Could you tell me what I put as the link address in Cell E1 to make this happen.

Thanks,

Mike
 
Upvote 0
Upvote 0
Perhaps you could help me this way.

Let's say in cell A1 I type the row that I want to go to in the current worksheet - e.g. 12
In cell A2, I type the column I want to go to e.g. 26

Let's say the current worksheet is Sheet1 and the workbook is Book1.

In A3, I would like a hyperlink formula that will take me to the values specified in A1 and A2 - so in this example, I would jump to cell Z12. If I then typed a 4 in cell A2 and then hit the hyperlink I would go to D12 etc.

Thanks,

MikeG
 
Upvote 0
Sorry, it looks like you need a # sign in front of cell references:

<b>Excel 2003</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">AAA</td><td style=";">#Sheet1!C1</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="font-weight: bold;;">Dropdown</td><td style="font-weight: bold;;">Link</td><td style="text-align: right;;"></td><td style=";">BBB</td><td style=";">#Sheet1!C2</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style=";">BBB</td><td style="text-decoration: underline;color: #0000FF;;">Click for Details</td><td style="text-align: right;;"></td><td style=";">CCC</td><td style=";">#Sheet1!C3</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B3</th><td style="text-align:left">=HYPERLINK(<font color="Blue">INDEX(<font color="Red">E:E,MATCH(<font color="Green">A3,D:D,0</font>),</font>),"Click for Details"</font>)</td></tr></tbody></table></td></tr></table><br />

Microsoft help is useless.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,673
Members
452,937
Latest member
Bhg1984

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