how do I click on a drop down list and go to that data

D

Donna

I have created a drop down list for all of our locations. Within the same
spreadsheet is the data related to each location. How can I select the name
from the drop down list and go directly to that data within the spreadsheet
 
G

Gord Dibben

Presumably each of the locations is a named range?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Me.Range("A1") Then
Application.Goto Reference:=Target.Value, Scroll:=True
End If
End Sub

Assumes the dropdown list is in A1........adjust to suit.

This is sheet event code. Right-click on the sheet and "View Code"

Copy/paste the code into that module.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top