Hyperlink to cell in sheet from data validation list

Jasesair

Active Member
Joined
Apr 8, 2015
Messages
282
Office Version
  1. 2016
I have a Data Validation List in cell A8 containing names - Name1, Name2, Name3 etc. I'm wanting to link each name to elsewhere on the sheet. In my case, Name1 links to M3, Name2 links to W3, Name3 links to AG3 and so on - they're linking to cells that are 10 cells to the right of the previous. When the user makes their selection, I also like that to automate without the need to click again on the link.

Is this possible?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi, Yes this is possible using VBA.

Can you please share the dataset using XL2BB. It will help to check how your data is arranged on the sheet.
 
Upvote 0
Hi, Yes this is possible using VBA.

Can you please share the dataset using XL2BB. It will help to check how your data is arranged on th
Apologies, I can't do this at work - it's not possible. Not sure if it's needed, but the data for the list comes from another sheet in the Workbook.
 
Upvote 0
Try this Worksheet_Change event code

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Address = "$A$8" And Len(Range("A8").Value) > 0 Then Application.Goto Reference:=Cells(3, Application.Match(Range("A8").Value, Sheets("DV List").Range("A:A"), 0) * 10 - 7)
End Sub

21 02 10.xlsm
A
1Names
2Name1
3Name2
4Name3
5
DV List


21 02 10.xlsm
A
1
2
3
4
5
6
7
8Name2
Hyperlink
Cells with Data Validation
CellAllowCriteria
A8List='DV List'!$A$2:$A$4


Here is my sheet after I have selected "Name2" in A8

1612936979828.png
 
Upvote 0
Solution
So, so good! It caused another data validation list (in sheet "DV List") selection to navigate to the "Hyperlink" sheet A8 (it wasn't previously navigating anywhere). I've just fixed that by forcing it to navigate to a suitable cell.

Thanks again.
 
Upvote 0
I fear my next query is something for a new thread, but I'm not certain. The cells this navigates to are currently protected, so when the sheet is protected, the worksheet change obviously doesn't work. Is there a solution to this? The sheet needs to be protected and needs to be only 'Select unlocked cells'. These cells could be unprotected, but will need to have the formulas held in each protected, or even hidden ideally.
 
Upvote 0
If you want protection and only select unlocked cells, why are you trying to navigate to a locked cell. It's contradictory. :confused:
 
Upvote 0
Agree, it is contradictory!!! It's navigating to people's names because below the names are cells that only become unlocked when certain other things happen - this stuff happens before the user uses the data validation list. These unlocked cells will vary so there's not any one cell that I could direct them to. To simplify, I want to be able to direct the user to the name which then puts the user in the right location.
 
Upvote 0
Just the same. If you don't want the code to select a locked cell, where do you want the selection?

.. or perhaps you don't want/need to select anything in the M/W/AG/... columns, just scroll so they are visible?

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Address = "$A$8" And Len(Range("A8").Value) > 0 Then ActiveWindow.ScrollColumn = Application.Match(Range("A8").Value, Sheets("DV List").Range("A:A"), 0) * 10 - 7
End Sub
 
Upvote 0
Oh wow, that's exactly what I'm chasing! ScrollColumn - I'll be using this plenty in the future! Many thanks.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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