how to go to next row?

C

cousin_jammie

Is there any way to set up my worksheet so that when I get to a specific
column of data, I can press enter (or some other keyboard shortcut) and
have the curser automatically go to the first cell in the next row?


Thanks and kind regards
Jan
 
D

Dave Peterson

How about right after you change a cell (in column D in my example)?

Right click on the worksheet that should have this behavior and select view
code. Then paste this in:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Then Exit Sub

If Intersect(Target, Range("D:D")) Is Nothing Then Exit Sub

Application.EnableEvents = False
Cells(Target.Row + 1, 1).Select
Application.EnableEvents = True

End Sub


If you just hit enter in when a cell in column D is selected--nothing happens.
But if you were to make a change (or even an F2, enter (no change really)),
it'll drop to column A of the next row.
 
R

Ragdyer

FWIW,
Click an empty cell and drag it over and down about 5 or 10 cells.
You now have a selection of cells highlighted, with the focus on the top,
left cell.

Hold down the <Enter> key.
You will see the focus move down only as far as the selection and then
change columns and continue this down and over travel, with the loop
remaining within the selection.

You can use this as a quick and easy data entry control.

Now, do the same thing with the <Tab> key, and you get right to left
controlled movement.
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
Top