+ Reply to Thread
Results 1 to 2 of 2

Jump to top of next column on Enter

Hybrid View

Jason_2112 Jump to top of next column on... 07-07-2010, 01:21 PM
Jason_2112 Re: Jump to top of next... 07-07-2010, 01:46 PM
  1. #1
    Registered User
    Join Date
    03-01-2007
    Posts
    47

    Jump to top of next column on Enter

    Hello,

    I have an area where I'm entering data. It is 12 columns x 40 rows. I'd like to enter data in the left column, and when I hit "Enter" at the bottom of one column, I'd like the next cell selected to be at the top of the next column.

    Example: The last cell in the first column is B49. When I hit "Enter", I'd like it to jump to C10 which is the top of the next column.

    This maybe should be in programming, but I thought maybe there was a way to create a custom "work area" where the active cells are selected only in that range...

    Thanks for any help.

    Jason
    Last edited by Jason_2112; 07-07-2010 at 01:46 PM.

  2. #2
    Registered User
    Join Date
    03-01-2007
    Posts
    47

    Re: Jump to top of next column on Enter

    Ok, I just solved my own problem. I'm using this in the code for each worksheet.
    This jumps to the next column when the cell below my last data entry is selected.

    ie.: I enter data in B49 and then hit enter which selects B50. When B50 is selected, it jumps to the top of the next column.

    Option Explicit
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address = "$B$50" Then Cells(10, 3).Select
    If Target.Address = "$C$50" Then Cells(10, 4).Select
    If Target.Address = "$D$50" Then Cells(10, 5).Select
    If Target.Address = "$E$50" Then Cells(10, 6).Select
    If Target.Address = "$F$50" Then Cells(10, 7).Select
    If Target.Address = "$G$50" Then Cells(10, 8).Select
    If Target.Address = "$H$50" Then Cells(10, 9).Select
    If Target.Address = "$I$50" Then Cells(10, 10).Select
    If Target.Address = "$J$50" Then Cells(10, 11).Select
    If Target.Address = "$K$50" Then Cells(10, 12).Select
    If Target.Address = "$L$50" Then Cells(10, 13).Select
    
    End Sub
    It does what I'm looking for.

    Thanks,

    Jason
    Last edited by Jason_2112; 07-07-2010 at 02:10 PM. Reason: Added additional information about function of code.

+ 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