+ Reply to Thread
Results 1 to 9 of 9

Go to specific cell after pressing Enter

  1. #1
    Registered User
    Join Date
    08-21-2011
    Location
    Perrysville, IN USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Go to specific cell after pressing Enter

    I sure hope somebody can help me with this one. I have a sheet with 9 groups of cells. The first group asks for date (cell J2) and name (cell J3).
    The remaining 8 groups are all related to each other. They ask for 19 fields worth of information each. The cells in each group need to go in a specific order though.
    So, here is what I'm looking at. After putting in the date into J2, and the name into J3, the next set of cells to be filled in are D5, D6, D7, D8, D9, E6, E7, E8, E9, F6, F7, F8, F9, G4, G5, G6, G7, G8, and G9 in that order. After that set is done, it moves to the next group that looks exactly the same but spans from J - M, and so on it continues.

    If you are still following me, what I need to do is be able to press Enter and go to each cell in that specific order. I can get this accomplished through Worksheet SelectionChange, however that only works if I actually make a change to each cell. Sometimes I won't actually be entering any data into some of the cells, but instead just "Entering" (is that a word?) through them.

    Anyway, I hope I made that clear enough, and some Excel genius out there can help me reach a solution. Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Go to specific cell after pressing Enter

    Do you need to be able to change anything else in the sheet, or just those cells?

    If you protect everything except the cells that have listed above, then it will work just fine, the only exception being, when you move to the second group it will go to J2, then J3 instead of going straight to J5.

  3. #3
    Registered User
    Join Date
    08-21-2011
    Location
    Perrysville, IN USA
    MS-Off Ver
    Excel 2007
    Posts
    6
    Quote Originally Posted by jason.b75 View Post
    Do you need to be able to change anything else in the sheet, or just those cells?

    If you protect everything except the cells that have listed above, then it will work just fine, the only exception being, when you move to the second group it will go to J2, then J3 instead of going straight to J5.
    I have unlocked only the cells that I want user input in. However, since they are not in a straight up and down order, that won't work as I want. Im attaching a picture to give an idea of what I have going on. I apologize for the quality. Im working on this file on a work computer that does not have internet access, so I had to take a picture with my phone. Basically, after filling in date and name, you go to the section of "Micro 1", then "Micro 2", etc. But, like I mentioned, you will not always fill out all of the fields in each group, as sometimes I will not have values for D1, D2, and Bloom ID. This is why i cant get it to work with SelectionChange, as sometimes nothing will change in a given cell.
    Attached Images Attached Images

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Go to specific cell after pressing Enter

    Ok, now it makes more sense.

    We would prefer a sample workbook to work with, but as you're not able to provide one, I need to check a few details first.

    Looking at the picture, I'm not seeing the same ranges that you listed in your first post. Could you please confirm the correct ranges.

    Trying to count the rows, I'm seeing D9:D13,E10:E13,F10:F13 and H8:H13 for 'micro1'

    Looking at the name and date at the top, are J2 and J3 merged across multiple columns?

    Are the cells used to create the thick border around each section merged? B4:R4, for example. (I think that it should be possible with selection change, but the bottom border of each section would need to be unmerged and unlocked).

  5. #5
    Registered User
    Join Date
    08-21-2011
    Location
    Perrysville, IN USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Go to specific cell after pressing Enter

    When I was giving you the original ranges, it was by my faulty memory. I forgot that I had it going down 4 and then starting micro 5 - 8 back at the top on the right side. I was able to get the file onto a flash drive and moved over to a computer with internet access, so I will include a link to it and also a screenshot from this computer. J3 and J4 are merged. The border cells are not merged.

    screenshot.png
    Attached Files Attached Files

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Go to specific cell after pressing Enter

    Just a passing observation.
    As there is already a VBA approach (i.e. code behind at least two sheets).
    Would not a Userform with an 8 page multipage be a better approach.
    Once one page is coded the rest is repetition.
    torachan.

  7. #7
    Registered User
    Join Date
    08-21-2011
    Location
    Perrysville, IN USA
    MS-Off Ver
    Excel 2007
    Posts
    6
    Quote Originally Posted by torachan View Post
    Just a passing observation.
    As there is already a VBA approach (i.e. code behind at least two sheets).
    Would not a Userform with an 8 page multipage be a better approach.
    Once one page is coded the rest is repetition.
    torachan.
    Yes..yes it would. Why it never even occured to me to do that is insane. That would have saved a lot of time too. Ugh. Thanks for thinking outside of the box for me

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Go to specific cell after pressing Enter

    I'm liking torachan's suggestion as the better approach to this, but given my incompatibility with userforms I'm going to stick to my original idea, which is replacing the worksheet_change code that you started on with worksheet_selection change (the 2 are different).

    I was unable to post the code to the forum because the board software keeps blocking it as an sql injection, but I've attached an updated copy of the workbook.
    Attached Files Attached Files

  9. #9
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Go to specific cell after pressing Enter

    Colourful blank template multipage if you are inclined to follow this approach.
    torachan.
    Attached Files Attached Files

+ 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. [SOLVED] Move to specific cell after pressing enter
    By aglawrence in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 01-05-2024, 03:53 AM
  2. [SOLVED] Move Cursor to a specific cell after pressing enter
    By davidcrawt in forum Excel General
    Replies: 1
    Last Post: 03-07-2019, 09:03 AM
  3. [SOLVED] Need To Simulate Pressing Enter Key On A Cell Every Second
    By Ourkid123uk in forum Excel General
    Replies: 12
    Last Post: 02-28-2018, 10:28 AM
  4. Reselect cell after pressing enter
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-19-2010, 10:38 PM
  5. Alt + Enter when pressing enter in cell?
    By Stiff in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-20-2009, 05:31 AM
  6. Auto Jumping to next cell without pressing enter
    By Steve Brown in forum Excel General
    Replies: 1
    Last Post: 01-21-2008, 02:47 PM
  7. Active Cell after pressing the Enter Key
    By RealNewbie in forum Excel General
    Replies: 2
    Last Post: 10-17-2007, 09:56 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