+ Reply to Thread
Results 1 to 3 of 3

write a macro to input data

  1. #1
    JPreeshl
    Guest

    write a macro to input data

    I want to write a macro where I can input a number, move to the next cell,
    input another number, move to the next cell, etc. for 9 numbers. After 9
    numbers I want the cursor to go down and to the first column in the next row
    so I can do the same thing again.

  2. #2
    Otto Moehrbach
    Guest

    Re: write a macro to input data

    Setup in Tools - Edit tab - Move in Direction so that the cursor will move
    to the right when you hit enter. That will produce the moving to the right
    part of what you want. The following macro will move the cursor to the A
    column of the next row whenever anything is entered in Column I. Note that
    this is a Worksheet_Change event macro and must be placed in the sheet
    module of the sheet in which you want this to happen. To access that
    module, right-click on the sheet tab of that sheet, select View Code, and
    paste this macro into that module. Click on the "X" in the top right corner
    of the screen to return to your sheet. HTH Otto

    Private Sub Worksheet_Change(ByVal Target As Range)
    If IsEmpty(Target.Value) Then Exit Sub
    If Target.Column = 9 Then _
    Cells(Target.Row + 1, 1).Select
    End Sub
    "JPreeshl" <[email protected]> wrote in message
    news:[email protected]...
    >I want to write a macro where I can input a number, move to the next cell,
    > input another number, move to the next cell, etc. for 9 numbers. After 9
    > numbers I want the cursor to go down and to the first column in the next
    > row
    > so I can do the same thing again.




  3. #3
    L. Howard Kittle
    Guest

    Re: write a macro to input data

    Unless you are dead set to have a macro do this, you can accomplish the same
    from the keyboard.

    After each entry hit the Tab until the ninth entry, for the ninth entry hit
    Enter.

    HTH
    Regards,
    Howard

    "JPreeshl" <[email protected]> wrote in message
    news:[email protected]...
    >I want to write a macro where I can input a number, move to the next cell,
    > input another number, move to the next cell, etc. for 9 numbers. After 9
    > numbers I want the cursor to go down and to the first column in the next
    > row
    > so I can do the same thing again.




+ 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