Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JPreeshl
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach
 
Posts: n/a
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.misc
L. Howard Kittle
 
Posts: n/a
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
write a macro for variable cells Garry Excel Discussion (Misc queries) 0 March 22nd 06 07:45 PM
Use a static set of data for input into a macro cdb Excel Discussion (Misc queries) 2 March 16th 06 03:50 PM
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
Macro does not run when data refreshed Larry Lehman Excel Discussion (Misc queries) 0 January 16th 05 07:31 PM


All times are GMT +1. The time now is 03:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"