ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cursor Movement (https://www.excelbanter.com/excel-discussion-misc-queries/198412-cursor-movement.html)

Froggy2899

Cursor Movement
 
Someone asked this question
"How do I ensure that Excel returns the cursor to column A after pressing
enter in column C?"
And this was the answer
"You could start entering data in a row, and use the <Tab key to move the
focus along the row, across columns.
Then, a hit of the <Enter key returns the focus to the starting column, one
row beneath the original cell."

How do I fix this if it stops working? I have Excel 03 and I type in cell
A1 then hit tab, type in cell B1 then hit tab and type in cell C1 and hit
enter. I want the cursor to return to A2 when I hit enter. I have always
been able to do this and now all of a sudden I can't.

HELP



Gary''s Student

Cursor Movement
 
After putting this macro in the worksheet code area, the completion of an
entry in column C will take you to column A one row down:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set c = Range("C:C")
If Intersect(t, c) Is Nothing Then Exit Sub
Cells(t.Row + 1, 1).Select
End Sub

You can use the ENTER key, the TAB key, or the ARROW keys.

Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200799


"Froggy2899" wrote:

Someone asked this question
"How do I ensure that Excel returns the cursor to column A after pressing
enter in column C?"
And this was the answer
"You could start entering data in a row, and use the <Tab key to move the
focus along the row, across columns.
Then, a hit of the <Enter key returns the focus to the starting column, one
row beneath the original cell."

How do I fix this if it stops working? I have Excel 03 and I type in cell
A1 then hit tab, type in cell B1 then hit tab and type in cell C1 and hit
enter. I want the cursor to return to A2 when I hit enter. I have always
been able to do this and now all of a sudden I can't.

HELP



Gord Dibben

Cursor Movement
 
Perhaps you have changed direction or unchecked ToolsOptionsEdit

"Move selection after enter"

Must be set to "Down" for your Tab and Enter method to work.


Gord Dibben MS Excel MVP

On Mon, 11 Aug 2008 12:07:01 -0700, Froggy2899
wrote:

Someone asked this question
"How do I ensure that Excel returns the cursor to column A after pressing
enter in column C?"
And this was the answer
"You could start entering data in a row, and use the <Tab key to move the
focus along the row, across columns.
Then, a hit of the <Enter key returns the focus to the starting column, one
row beneath the original cell."

How do I fix this if it stops working? I have Excel 03 and I type in cell
A1 then hit tab, type in cell B1 then hit tab and type in cell C1 and hit
enter. I want the cursor to return to A2 when I hit enter. I have always
been able to do this and now all of a sudden I can't.

HELP




All times are GMT +1. The time now is 04:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com