+ Reply to Thread
Results 1 to 6 of 6

cursor movement within a sheet

  1. #1
    Janet Panighetti
    Guest

    cursor movement within a sheet

    How can I move directly control the cursor movement after pressing enter.
    For example, I would like my cursor movement to go something like this:



    CELL MOVEMENT

    B5 DOWN
    B6 DOWN
    B7 DOWN
    B8 FIRST CELL IN NEXT SECTION

    G5 RIGHT
    H5 DOWN/LEFT
    G6 RIGHT
    H6 DOWN/LEFT
    G7 RIGHT
    H7 DOWN/LEFT
    G8

    I use protected worksheets allowing entry into unlocked cells.

    If I set "Move selection after Enter" direction to "right" then after B5 I
    end up going to G5 instead of B6. If I set "Move selection after Enter" to
    "down" then my entry into the "B" column goes well but then I move from G5 to
    G6 instead of H5 (which is where I really wanted to go next).

    So.....

    How may I more directly control cursor movement after the Enter key is
    pressed?



    Thanks in advance,
    Janet

  2. #2
    Otto Moehrbach
    Guest

    Re: cursor movement within a sheet

    Janet
    One way is to use the tab key, instead of the Enter key when you make an
    entry. That way, the focus will move to the next unlocked cell. However,
    with this method Excel dictates the order of the focus movement, not you.
    Excel will go by rows first, then by columns. If this fits into your
    scheme, good. Try it out.
    There is another way. Below is a write-up I have on that method. HTH
    Otto
    This Way Involves Range Names:

    Note that you dictate the order in which the focus changes by the order in
    which you select the cells below.

    Select your SECOND cell for data entry and then hold down <Ctrl> and
    continue to select all the rest of the desired cells IN ORDER, ending with
    the FIRST cell.

    While the cells are still selected, click in the name box and give this
    range a name. You can also click Insert - Name - Define and type in the
    name you want.



    Now, when you're ready for data entry, simply click on the range name in the
    name box, or hit F5, select the range name you want, and click OK. The
    focus for the range is the first cell for data input so all you have to do
    now is type your data and hit enter and the focus then moves to each
    successive cell in your range. Just mouse click away to break out of the
    loop. HTH Otto



    "Janet Panighetti" <JanetPanighetti@discussions.microsoft.com> wrote in
    message news:DE32C931-A875-4A59-9CE4-F403530F49A5@microsoft.com...
    > How can I move directly control the cursor movement after pressing enter.
    > For example, I would like my cursor movement to go something like this:
    >
    >
    >
    > CELL MOVEMENT
    >
    > B5 DOWN
    > B6 DOWN
    > B7 DOWN
    > B8 FIRST CELL IN NEXT SECTION
    >
    > G5 RIGHT
    > H5 DOWN/LEFT
    > G6 RIGHT
    > H6 DOWN/LEFT
    > G7 RIGHT
    > H7 DOWN/LEFT
    > G8
    >
    > I use protected worksheets allowing entry into unlocked cells.
    >
    > If I set "Move selection after Enter" direction to "right" then after B5 I
    > end up going to G5 instead of B6. If I set "Move selection after Enter"
    > to
    > "down" then my entry into the "B" column goes well but then I move from G5
    > to
    > G6 instead of H5 (which is where I really wanted to go next).
    >
    > So.....
    >
    > How may I more directly control cursor movement after the Enter key is
    > pressed?
    >
    >
    >
    > Thanks in advance,
    > Janet




  3. #3
    Janet Panighetti
    Guest

    Re: cursor movement within a sheet

    Well, I've only read this and haven't tried it, but it sounds to me like
    there are a lot of extra keystrokes and movements that I don't want. I
    simply want to be able to go to the "desired" cell once I press the enter key.

    Are you saying there is no way to do some sort of post processing on a cell
    that basically does something like "go to cell g5"?



    "Otto Moehrbach" wrote:

    > Janet
    > One way is to use the tab key, instead of the Enter key when you make an
    > entry. That way, the focus will move to the next unlocked cell. However,
    > with this method Excel dictates the order of the focus movement, not you.
    > Excel will go by rows first, then by columns. If this fits into your
    > scheme, good. Try it out.
    > There is another way. Below is a write-up I have on that method. HTH
    > Otto
    > This Way Involves Range Names:
    >
    > Note that you dictate the order in which the focus changes by the order in
    > which you select the cells below.
    >
    > Select your SECOND cell for data entry and then hold down <Ctrl> and
    > continue to select all the rest of the desired cells IN ORDER, ending with
    > the FIRST cell.
    >
    > While the cells are still selected, click in the name box and give this
    > range a name. You can also click Insert - Name - Define and type in the
    > name you want.
    >
    >
    >
    > Now, when you're ready for data entry, simply click on the range name in the
    > name box, or hit F5, select the range name you want, and click OK. The
    > focus for the range is the first cell for data input so all you have to do
    > now is type your data and hit enter and the focus then moves to each
    > successive cell in your range. Just mouse click away to break out of the
    > loop. HTH Otto
    >
    >
    >
    > "Janet Panighetti" <JanetPanighetti@discussions.microsoft.com> wrote in
    > message news:DE32C931-A875-4A59-9CE4-F403530F49A5@microsoft.com...
    > > How can I move directly control the cursor movement after pressing enter.
    > > For example, I would like my cursor movement to go something like this:
    > >
    > >
    > >
    > > CELL MOVEMENT
    > >
    > > B5 DOWN
    > > B6 DOWN
    > > B7 DOWN
    > > B8 FIRST CELL IN NEXT SECTION
    > >
    > > G5 RIGHT
    > > H5 DOWN/LEFT
    > > G6 RIGHT
    > > H6 DOWN/LEFT
    > > G7 RIGHT
    > > H7 DOWN/LEFT
    > > G8
    > >
    > > I use protected worksheets allowing entry into unlocked cells.
    > >
    > > If I set "Move selection after Enter" direction to "right" then after B5 I
    > > end up going to G5 instead of B6. If I set "Move selection after Enter"
    > > to
    > > "down" then my entry into the "B" column goes well but then I move from G5
    > > to
    > > G6 instead of H5 (which is where I really wanted to go next).
    > >
    > > So.....
    > >
    > > How may I more directly control cursor movement after the Enter key is
    > > pressed?
    > >
    > >
    > >
    > > Thanks in advance,
    > > Janet

    >
    >
    >


  4. #4
    Gord Dibben
    Guest

    Re: cursor movement within a sheet

    Janet

    You can use worksheet event code to govern the movement after you enter data and
    hit the ENTER key.

    'moves from C2 through E5 at entry
    'add cases as needed
    Private Sub Worksheet_Change(ByVal Target As Range)
    Select Case Target.Address
    Case "$C$2"
    Range("C5").Select
    Case "$C$5"
    Range("E2").Select
    Case "$E$2"
    Range("E5").Select
    End Select
    End Sub

    Right-click on the sheet tab and "View Code".

    Copy/paste the above into that module.


    Gord Dibben MS Excel MVP

    On Fri, 9 Jun 2006 14:25:01 -0700, Janet Panighetti
    <JanetPanighetti@discussions.microsoft.com> wrote:

    >Well, I've only read this and haven't tried it, but it sounds to me like
    >there are a lot of extra keystrokes and movements that I don't want. I
    >simply want to be able to go to the "desired" cell once I press the enter key.
    >
    >Are you saying there is no way to do some sort of post processing on a cell
    >that basically does something like "go to cell g5"?
    >
    >
    >
    >"Otto Moehrbach" wrote:
    >
    >> Janet
    >> One way is to use the tab key, instead of the Enter key when you make an
    >> entry. That way, the focus will move to the next unlocked cell. However,
    >> with this method Excel dictates the order of the focus movement, not you.
    >> Excel will go by rows first, then by columns. If this fits into your
    >> scheme, good. Try it out.
    >> There is another way. Below is a write-up I have on that method. HTH
    >> Otto
    >> This Way Involves Range Names:
    >>
    >> Note that you dictate the order in which the focus changes by the order in
    >> which you select the cells below.
    >>
    >> Select your SECOND cell for data entry and then hold down <Ctrl> and
    >> continue to select all the rest of the desired cells IN ORDER, ending with
    >> the FIRST cell.
    >>
    >> While the cells are still selected, click in the name box and give this
    >> range a name. You can also click Insert - Name - Define and type in the
    >> name you want.
    >>
    >>
    >>
    >> Now, when you're ready for data entry, simply click on the range name in the
    >> name box, or hit F5, select the range name you want, and click OK. The
    >> focus for the range is the first cell for data input so all you have to do
    >> now is type your data and hit enter and the focus then moves to each
    >> successive cell in your range. Just mouse click away to break out of the
    >> loop. HTH Otto
    >>
    >>
    >>
    >> "Janet Panighetti" <JanetPanighetti@discussions.microsoft.com> wrote in
    >> message news:DE32C931-A875-4A59-9CE4-F403530F49A5@microsoft.com...
    >> > How can I move directly control the cursor movement after pressing enter.
    >> > For example, I would like my cursor movement to go something like this:
    >> >
    >> >
    >> >
    >> > CELL MOVEMENT
    >> >
    >> > B5 DOWN
    >> > B6 DOWN
    >> > B7 DOWN
    >> > B8 FIRST CELL IN NEXT SECTION
    >> >
    >> > G5 RIGHT
    >> > H5 DOWN/LEFT
    >> > G6 RIGHT
    >> > H6 DOWN/LEFT
    >> > G7 RIGHT
    >> > H7 DOWN/LEFT
    >> > G8
    >> >
    >> > I use protected worksheets allowing entry into unlocked cells.
    >> >
    >> > If I set "Move selection after Enter" direction to "right" then after B5 I
    >> > end up going to G5 instead of B6. If I set "Move selection after Enter"
    >> > to
    >> > "down" then my entry into the "B" column goes well but then I move from G5
    >> > to
    >> > G6 instead of H5 (which is where I really wanted to go next).
    >> >
    >> > So.....
    >> >
    >> > How may I more directly control cursor movement after the Enter key is
    >> > pressed?
    >> >
    >> >
    >> >
    >> > Thanks in advance,
    >> > Janet

    >>
    >>
    >>



  5. #5
    Janet Panighetti
    Guest

    Re: cursor movement within a sheet

    Thank you, Gord! This works perfectly!

    Janet

    "Gord Dibben" wrote:

    > Janet
    >
    > You can use worksheet event code to govern the movement after you enter data and
    > hit the ENTER key.
    >
    > 'moves from C2 through E5 at entry
    > 'add cases as needed
    > Private Sub Worksheet_Change(ByVal Target As Range)
    > Select Case Target.Address
    > Case "$C$2"
    > Range("C5").Select
    > Case "$C$5"
    > Range("E2").Select
    > Case "$E$2"
    > Range("E5").Select
    > End Select
    > End Sub
    >
    > Right-click on the sheet tab and "View Code".
    >
    > Copy/paste the above into that module.
    >
    >
    > Gord Dibben MS Excel MVP
    >
    > On Fri, 9 Jun 2006 14:25:01 -0700, Janet Panighetti
    > <JanetPanighetti@discussions.microsoft.com> wrote:
    >
    > >Well, I've only read this and haven't tried it, but it sounds to me like
    > >there are a lot of extra keystrokes and movements that I don't want. I
    > >simply want to be able to go to the "desired" cell once I press the enter key.
    > >
    > >Are you saying there is no way to do some sort of post processing on a cell
    > >that basically does something like "go to cell g5"?
    > >
    > >
    > >
    > >"Otto Moehrbach" wrote:
    > >
    > >> Janet
    > >> One way is to use the tab key, instead of the Enter key when you make an
    > >> entry. That way, the focus will move to the next unlocked cell. However,
    > >> with this method Excel dictates the order of the focus movement, not you.
    > >> Excel will go by rows first, then by columns. If this fits into your
    > >> scheme, good. Try it out.
    > >> There is another way. Below is a write-up I have on that method. HTH
    > >> Otto
    > >> This Way Involves Range Names:
    > >>
    > >> Note that you dictate the order in which the focus changes by the order in
    > >> which you select the cells below.
    > >>
    > >> Select your SECOND cell for data entry and then hold down <Ctrl> and
    > >> continue to select all the rest of the desired cells IN ORDER, ending with
    > >> the FIRST cell.
    > >>
    > >> While the cells are still selected, click in the name box and give this
    > >> range a name. You can also click Insert - Name - Define and type in the
    > >> name you want.
    > >>
    > >>
    > >>
    > >> Now, when you're ready for data entry, simply click on the range name in the
    > >> name box, or hit F5, select the range name you want, and click OK. The
    > >> focus for the range is the first cell for data input so all you have to do
    > >> now is type your data and hit enter and the focus then moves to each
    > >> successive cell in your range. Just mouse click away to break out of the
    > >> loop. HTH Otto
    > >>
    > >>
    > >>
    > >> "Janet Panighetti" <JanetPanighetti@discussions.microsoft.com> wrote in
    > >> message news:DE32C931-A875-4A59-9CE4-F403530F49A5@microsoft.com...
    > >> > How can I move directly control the cursor movement after pressing enter.
    > >> > For example, I would like my cursor movement to go something like this:
    > >> >
    > >> >
    > >> >
    > >> > CELL MOVEMENT
    > >> >
    > >> > B5 DOWN
    > >> > B6 DOWN
    > >> > B7 DOWN
    > >> > B8 FIRST CELL IN NEXT SECTION
    > >> >
    > >> > G5 RIGHT
    > >> > H5 DOWN/LEFT
    > >> > G6 RIGHT
    > >> > H6 DOWN/LEFT
    > >> > G7 RIGHT
    > >> > H7 DOWN/LEFT
    > >> > G8
    > >> >
    > >> > I use protected worksheets allowing entry into unlocked cells.
    > >> >
    > >> > If I set "Move selection after Enter" direction to "right" then after B5 I
    > >> > end up going to G5 instead of B6. If I set "Move selection after Enter"
    > >> > to
    > >> > "down" then my entry into the "B" column goes well but then I move from G5
    > >> > to
    > >> > G6 instead of H5 (which is where I really wanted to go next).
    > >> >
    > >> > So.....
    > >> >
    > >> > How may I more directly control cursor movement after the Enter key is
    > >> > pressed?
    > >> >
    > >> >
    > >> >
    > >> > Thanks in advance,
    > >> > Janet
    > >>
    > >>
    > >>

    >
    >


  6. #6
    Gord Dibben
    Guest

    Re: cursor movement within a sheet

    Thanks for the feedback Janet.

    Happy to assist.

    Gord

    On Mon, 12 Jun 2006 08:36:01 -0700, Janet Panighetti
    <JanetPanighetti@discussions.microsoft.com> wrote:

    >Thank you, Gord! This works perfectly!
    >
    >Janet
    >
    >"Gord Dibben" wrote:
    >
    >> Janet
    >>
    >> You can use worksheet event code to govern the movement after you enter data and
    >> hit the ENTER key.
    >>
    >> 'moves from C2 through E5 at entry
    >> 'add cases as needed
    >> Private Sub Worksheet_Change(ByVal Target As Range)
    >> Select Case Target.Address
    >> Case "$C$2"
    >> Range("C5").Select
    >> Case "$C$5"
    >> Range("E2").Select
    >> Case "$E$2"
    >> Range("E5").Select
    >> End Select
    >> End Sub
    >>
    >> Right-click on the sheet tab and "View Code".
    >>
    >> Copy/paste the above into that module.
    >>
    >>
    >> Gord Dibben MS Excel MVP
    >>
    >> On Fri, 9 Jun 2006 14:25:01 -0700, Janet Panighetti
    >> <JanetPanighetti@discussions.microsoft.com> wrote:
    >>
    >> >Well, I've only read this and haven't tried it, but it sounds to me like
    >> >there are a lot of extra keystrokes and movements that I don't want. I
    >> >simply want to be able to go to the "desired" cell once I press the enter key.
    >> >
    >> >Are you saying there is no way to do some sort of post processing on a cell
    >> >that basically does something like "go to cell g5"?
    >> >
    >> >
    >> >
    >> >"Otto Moehrbach" wrote:
    >> >
    >> >> Janet
    >> >> One way is to use the tab key, instead of the Enter key when you make an
    >> >> entry. That way, the focus will move to the next unlocked cell. However,
    >> >> with this method Excel dictates the order of the focus movement, not you.
    >> >> Excel will go by rows first, then by columns. If this fits into your
    >> >> scheme, good. Try it out.
    >> >> There is another way. Below is a write-up I have on that method. HTH
    >> >> Otto
    >> >> This Way Involves Range Names:
    >> >>
    >> >> Note that you dictate the order in which the focus changes by the order in
    >> >> which you select the cells below.
    >> >>
    >> >> Select your SECOND cell for data entry and then hold down <Ctrl> and
    >> >> continue to select all the rest of the desired cells IN ORDER, ending with
    >> >> the FIRST cell.
    >> >>
    >> >> While the cells are still selected, click in the name box and give this
    >> >> range a name. You can also click Insert - Name - Define and type in the
    >> >> name you want.
    >> >>
    >> >>
    >> >>
    >> >> Now, when you're ready for data entry, simply click on the range name in the
    >> >> name box, or hit F5, select the range name you want, and click OK. The
    >> >> focus for the range is the first cell for data input so all you have to do
    >> >> now is type your data and hit enter and the focus then moves to each
    >> >> successive cell in your range. Just mouse click away to break out of the
    >> >> loop. HTH Otto
    >> >>
    >> >>
    >> >>
    >> >> "Janet Panighetti" <JanetPanighetti@discussions.microsoft.com> wrote in
    >> >> message news:DE32C931-A875-4A59-9CE4-F403530F49A5@microsoft.com...
    >> >> > How can I move directly control the cursor movement after pressing enter.
    >> >> > For example, I would like my cursor movement to go something like this:
    >> >> >
    >> >> >
    >> >> >
    >> >> > CELL MOVEMENT
    >> >> >
    >> >> > B5 DOWN
    >> >> > B6 DOWN
    >> >> > B7 DOWN
    >> >> > B8 FIRST CELL IN NEXT SECTION
    >> >> >
    >> >> > G5 RIGHT
    >> >> > H5 DOWN/LEFT
    >> >> > G6 RIGHT
    >> >> > H6 DOWN/LEFT
    >> >> > G7 RIGHT
    >> >> > H7 DOWN/LEFT
    >> >> > G8
    >> >> >
    >> >> > I use protected worksheets allowing entry into unlocked cells.
    >> >> >
    >> >> > If I set "Move selection after Enter" direction to "right" then after B5 I
    >> >> > end up going to G5 instead of B6. If I set "Move selection after Enter"
    >> >> > to
    >> >> > "down" then my entry into the "B" column goes well but then I move from G5
    >> >> > to
    >> >> > G6 instead of H5 (which is where I really wanted to go next).
    >> >> >
    >> >> > So.....
    >> >> >
    >> >> > How may I more directly control cursor movement after the Enter key is
    >> >> > pressed?
    >> >> >
    >> >> >
    >> >> >
    >> >> > Thanks in advance,
    >> >> > Janet
    >> >>
    >> >>
    >> >>

    >>
    >>


    Gord Dibben MS Excel MVP

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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