Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Carriage return problem

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    I am trying to get Excel to automatically go to the beginning cell of the next row. I have a worksheet that is 5 columns wide. When the last column e.g. E10 has data in it, I want to to automatically go to A11 for data input. Any help would be great.

    thanks

    [ This Message was edited by: ozone64 on 2002-04-22 17:25 ]

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-22 17:25, ozone64 wrote:
    Hi,

    I am trying to get Excel to automatically go to the beginning cell of the next row. I have a worksheet that is 5 columns wide. When the last column e.g. E10 has data in it, I want to to automatically go to A11 for data input. Any help would be great.

    thanks

    [ This Message was edited by: ozone64 on 2002-04-22 17:25 ]
    Hi,

    In the code module for the worksheet you are working on, put the
    following in the worksheet_change event......

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)

    If Target.Column <= 4 Then Cells(Target.Row, Target.Column + 1).Select
    If Target.Column = 5 Then Cells(Target.Row + 1, 1).Select

    End Sub

    This moves one cell to the right for the first 4 cols, then 1 row down and to col A when you enter in col E. In all other columns, it is whatever Excel is set to after a change.

    Bye,
    Jay

  3. #3
    MrExcel MVP
    Join Date
    Mar 2002
    Location
    Michigan USA
    Posts
    11,454
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-22 17:25, ozone64 wrote:
    Hi,

    I am trying to get Excel to automatically go to the beginning cell of the next row. I have a worksheet that is 5 columns wide. When the last column e.g. E10 has data in it, I want to to automatically go to A11 for data input. Any help would be great.

    thanks

    [ This Message was edited by: ozone64 on 2002-04-22 17:25 ]
    Hi ozone64:
    I realize that you asked for amacro solution, and Jay has provided one above.
    There ias a non-macro solution that also might be of interest here ...
    If you data entry cells are unlocked, and the worksheet is protected, then using the TAB key, after you TAB into E10, it will automatically into A11.

    HTH
    Regards!

    Yogi Anand, D.Eng, P.E.
    Energy Efficient Building Network LLC
    www.energyefficientbuild.com

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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