Forcing the cursor to move to A of the next line after D of the pr

G

Guest

Hi, I am hoping someone can tell me how I can get the cursor to move from
column D after entering data in that cell, and when I hit enter, the cursor
will automatically go to column A of the next line. My sheet is only using
columns A thru D, which is the way I want it, but when I hit return or enter,
I would like the cursor to go to the next line below to start data entry in
column A again.
 
R

Rick Rothstein \(MVP - VB\)

Hi, I am hoping someone can tell me how I can get the cursor to move from
column D after entering data in that cell, and when I hit enter, the
cursor
will automatically go to column A of the next line. My sheet is only
using
columns A thru D, which is the way I want it, but when I hit return or
enter,
I would like the cursor to go to the next line below to start data entry
in
column A again.

Adding this procedure...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 5 Then Cells(Target.Row + 1, 1).Activate
End Sub

to the worksheet's code window in a VBA macro appears to do what you asked.

Rick
 
G

Guest

Not the best, but one way...
Select (click on Column Header) Columns E - IV
Format, Columns, Hide.
Only A:D are now visible..
Click in A1;
Press TAB Key, once, twice and a third time.
Then Press the Enter-Key (While in Column D)

This only work if you start Tabbing from Column A only.
 
G

Gord Dibben

Couple of ways to do this.

1. Unlock columns A:D then protect the sheet. The Tab key will then do as you
wish or the Enter key will work if set to move right after entry.

2. With no protection, start in column A and Tab your way across to D then hit
Enter key to go back to A one row down.


Gord Dibben MS Excel MVP
 
R

Rick Rothstein \(MVP - VB\)

Hi, I am hoping someone can tell me how I can get the cursor to move from
Adding this procedure...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 5 Then Cells(Target.Row + 1, 1).Activate
End Sub

to the worksheet's code window in a VBA macro appears to do what you
asked.

By the way, for your request to make sense, I assumed you have your "Move
Selection After Enter" option set to "Right".

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top