digbeefeebee

New Member
Joined
Jan 8, 2019
Messages
4
Hello,

I am sure this is a quick fix but for the life me I can't work it out!
I am creating a planner with all months going along Row 1.
I want to create a drop down so when I select e.g. March it will take me to the month March on my spreadsheet.

It is going to be a rather long spreadsheet so was looking for a nicer look to navigate around rather than hyperlinking.

Could anyone help me?

Thank you so much!

Jodie
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Selecting March from dropdown in A1 takes user to D1

Place this code in the SHEET module
RightClick on sheet tab \ select ViewCode \ paste code into VBA editor \ back to Excel with {ALT}{F11}
Save workbook as macro-enabled

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address(0, 0) = "A1" Then Application.Goto (Rows(1).Find(Target))
End Sub

With worksheet looking like this

Excel 2016 (Windows) 32 bit
A
B
C
D
E
1
MarchJanuaryFebruaryMarchApril
Sheet: Sheet2
 
Last edited:
Upvote 0
Thank you, this worked however, I am noticing when I do this it removed my data validation after I select e.g. March from the drop down? Any Thoughts on this.
 
Upvote 0
Thank you, this worked however, I am noticing when I do this it removed my data validation after I select e.g. March from the drop down? Any Thoughts on this.

There is nothing in that code that would remove the data validation...Do you have any other code that might be removing the DV ?
 
Upvote 0
No, I am using no further code - I don't work with code a lot so very rarely use it.

When I use it once it disappears and I can't make a further selection, but I can type the cell the month and it will take me to the cell containing it. Just removes the 'drop down'. However, when I close the spreadsheet down and reopen it will appear again. :confused:
 
Upvote 0
As @Jaafar Tribak says there is nothing in the code to change data validation in cell A1 in any way

Similar code for you to try

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address(0, 0) = "A1" Then Rows(1).Find(Target).Activate
End Sub

If you are still having problems try a creating new workbook and test to see if it also happens there
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,078
Latest member
skydd

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