+ Reply to Thread
Results 1 to 17 of 17

Go to a cell from a drop down list

  1. #1
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Go to a cell from a drop down list

    2nd Post, First one was solved at the first time of asking. Very happy man.

    I have a sheet will a full years date starting at 01-Jan to 31-Dec in Range G3:NH3

    What I would like is to have a Drop Down list with all dates in and then once the required date is selected go to the selected date in the sheet

    Any help would be very much appreciated!

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Assuming your drop down is in Cell B3,

    Put this on the worksheet module -

    Please Login or Register  to view this content.
    and this on a normal module

    Please Login or Register  to view this content.
    See the file attached.
    Attached Files Attached Files
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Go to a cell from a drop down list

    This looks like it is exactly as I want but the list is in a merged cell c1/d1. what would I need to change in the code to make this happen please?

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Quote Originally Posted by Turkish04 View Post
    This looks like it is exactly as I want but the list is in a merged cell c1/d1. what would I need to change in the code to make this happen please?
    Unmerge your cell!

    Merged cells cause a lot of issues and are not recommended..

  5. #5
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Go to a cell from a drop down list

    I still can't get it to work. I have unmerged the cell so it is now in c1 but it wont jump to the cell.

    Any ideas?

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Can you attach the file?

  7. #7
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Go to a cell from a drop down list

    Hi NeedForExcel,

    For some reason it won't allow me to attach anything. I think it may be restrictions with my pc at work.

    It is exactly what I am after but the drop down list is now in c2. Is the drop down list created by data validation? the date range has also altered to F3:NG3.

    I will try to attach the file at home later but my laptop is issued through my work so I may encounter a similar issue.

    Any help would be appreciated!

  8. #8
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Is the drop down list created by data validation?
    Yes! It is a Data Validation List

  9. #9
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Go to a cell from a drop down list

    Hi NeedForExcel,

    I have got it to work apart from the automatic go to part. I have to call for the macro to run for it to execute.

    Any ideas

  10. #10
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Can you paste your code for the GoTo part?

  11. #11
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Go to a cell from a drop down list

    I copied your code and have changed the cell ref so it is as follows

    Sub GoToDate()
    Cells(3, Application.WorksheetFunction.Match(Range("C2"), Range("F3:NG3"), 0) + 6).Activate
    End Sub

  12. #12
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Try changing + 6 to + 5 and see if that works.

    And how are you trying to attach the workbook? Using the Paperclip icon?

  13. #13
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,247

    Re: Go to a cell from a drop down list

    Did you change the change event code to use:
    Please Login or Register  to view this content.
    and did you put the change event in the worksheet code module?

  14. #14
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Oh yes! He has a point there.. I just assumed you did! But did you, actually?

    Quote Originally Posted by rorya View Post
    Did you change the change event code to use:
    Please Login or Register  to view this content.
    and did you put the change event in the worksheet code module?

  15. #15
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Go to a cell from a drop down list

    Yes, for some reason it doesn't give me the option to attach.

    I have part resolved it by placing a button next to the drop down with the macro assigned so I am happy with that. I changed the +6 to +5 but that didn't resolve it.

    If you have any further ideas let me know. I really appreciate it.

    Just started a new job and its making me look half intelligent!

  16. #16
    Registered User
    Join Date
    04-21-2016
    Location
    Boston, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Go to a cell from a drop down list

    I had changed the target address but for some reason it was a lower case c. I have changed it to a capital and it works!!!

    Thank you

  17. #17
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Go to a cell from a drop down list

    Quote Originally Posted by Turkish04 View Post
    I had changed the target address but for some reason it was a lower case c. I have changed it to a capital and it works!!!

    Thank you
    Glad we could help! Drop by if you need any help further.. Thank you for the rep

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 03-02-2015, 09:04 AM
  2. [SOLVED] Update cell list based on Drop down List
    By eaflynn in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-24-2015, 03:48 PM
  3. Populate Drop-down list based on selection from previous drop-down list
    By Diventus in forum Excel - New Users/Basics
    Replies: 14
    Last Post: 01-11-2013, 10:55 AM
  4. Populate Drop-down list based on selection from previous drop-down list
    By poison_stone in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-11-2012, 06:10 PM
  5. Replies: 4
    Last Post: 08-14-2012, 03:41 PM
  6. Replies: 3
    Last Post: 04-16-2012, 10:14 PM
  7. Replies: 1
    Last Post: 08-15-2006, 12:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1