Macro or code to move cursor to next row home at end

dgpenny

New Member
Joined
Jan 1, 2004
Messages
46
I am using Enter key to move to the right as I enter data. At the end of the row I would like the cursor to move to the next row home cell. Thanks.
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,047
Office Version
  1. 365
Platform
  1. Windows
What do you mean by 'next row home cell'?

And where is the end of the row?
 

dgpenny

New Member
Joined
Jan 1, 2004
Messages
46
At the end of approximately 25 columns I want to hit Enter again and drop down to the next row at the first cell. I know I can hit "Home" key then down arrow, but with many other people entering data who are used to hitting "Enter" only to speed things up this would be most helpful. Thanks.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,047
Office Version
  1. 365
Platform
  1. Windows
Try this in the worksheet module.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Count <> 1 Then Exit Sub
    
    If Target.Column = 26 Then
        Application.EnableEvents = False
        Application.Goto Cells(Target.Row + 1, 1)
        Application.EnableEvents = True
    End If
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,118,037
Messages
5,569,791
Members
412,292
Latest member
The Bear named Joe
Top