Dropdown navigation menu

bruntonomo

Board Regular
Joined
Jul 29, 2018
Messages
67
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I am looking to create a drop down navigation menu in Excel, and found this Youtube video that is very close to doing what I want it to do. The only thing that I want to change from the solution in this video is that it doesn't require a Go button. I want the user to simply be able to choose an option from from the drop down list and it delivers them to an anchor link (cell) inside the Excel document. If anyone can tell me how to do this, I would be insanely grateful.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You need everything except the =HYPERLINK formula in the Go cell.

Right-click the tab of the sheet containing the data validation dropdown cell (for example D3), click View Code and insert this code:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Address = "$D$3" Then
        Application.Goto Reference:=Target.Value
    End If
    
End Sub
 
Upvote 0
That worked! Thank you so much! That's going to make things much easier to work with.

The Name Manger in Excel will not accept spaces. I'm fine with the names of cells not having spaces, but I would like the options in the drop down to have spaces as needed. Is there a way we can mask the options so that underscores display as spaces?
 
Upvote 0
With spaces in the dropdown values, change the code to:
Code:
        Application.Goto Reference:=Replace(Target.Value, " ", "")
and it will go to the equivalent defined name without spaces.

Or if your defined names have underscores:
Code:
        Application.Goto Reference:=Replace(Target.Value, " ", "_")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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