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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
7,327
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
 

bruntonomo

Board Regular
Joined
Jul 29, 2018
Messages
67
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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?
 

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
7,327
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:
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,715
Messages
5,833,284
Members
430,201
Latest member
Deepakpilla36

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
Top