auto carriage return


Posted by David Wood on August 17, 2000 7:21 AM

Is there anyway to have excel return to
the next row when you reach a certain column?
can a macro run just by landing in a cell or a
range of cells?

Posted by Celia on August 18, 0100 2:00 AM


David
This can, of course, be done with a VBA event procedure but it is also possible with just keyboard input :-
Go to Tools/Options…/Edit/Move Selection After Enter and select Direction : Down.
Assuming you want to input data into row 1 of columns A,B, & C and then row 2 et sequitor :-
Input in A1,tab to B1,input in B1 and tab to C1, input to C1 and press the enter key which will take you to cell A2.
Celia


Posted by David Wood on August 18, 0100 4:48 AM

The keyboard input is good but I have a template that
we use to enter data and we are in the habbet of using the enter key
to move to the next cell, and when we move to the next row
we need to start in column "b"
Any tips on the vba macro?

Posted by Celia on August 18, 0100 6:01 AM


David
If you want to move to column B of the next row after entering column F :-

Private Sub Worksheet_Change(ByVal Target As Range)
Dim endCol As Range, startCol As Range
Set endCol = Range("F:F")
Set startCol = Range("B:B")
If Not Application.Intersect(endCol, Range(Target.Address)) Is Nothing Then Cells(ActiveCell.Row + 1, startCol.Column).Select
End Sub

Celia




Posted by David w on August 18, 0100 10:05 AM

Celia,
Thank you so much. That is just what I have beed looking for.