Selection of Drop down list that allows you to go to a particular cell

D

Daphne

Hi all,

I need help to do the following thing:

1. Have a drop down list (e.g. Scenario 1, Scenario 2, Scenario 3)
2. When user select (e.g. Scenario 2) from the drop down list and click
on a "Go" Button, it will take the user to the cell that says Scenario
2.
3. There will only be one Scenario 2 in the whole sheet.

Thanks a lot.
 
L

L. Howard Kittle

Hi Daphne,

Assign this code to your "GO" button.

Sub GoToIt()
If Range("F1").Value = "S1" Then
Range("A30").Select
ElseIf Range("F1").Value = "S2" Then
Range("F30").Select
ElseIf Range("F1").Value = "S3" Then
Range("L30").Select
End If
End Sub

Where F1 is the drop down value and change A30, F30 and L30 to suit your
sheet.

HTH
Regards,
Howard
 
D

Daphne

Thanks a lot. =)


L. Howard Kittle said:
Hi Daphne,

Assign this code to your "GO" button.

Sub GoToIt()
If Range("F1").Value = "S1" Then
Range("A30").Select
ElseIf Range("F1").Value = "S2" Then
Range("F30").Select
ElseIf Range("F1").Value = "S3" Then
Range("L30").Select
End If
End Sub

Where F1 is the drop down value and change A30, F30 and L30 to suit your
sheet.

HTH
Regards,
Howard
 

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