ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cursor movement upon an event (https://www.excelbanter.com/excel-programming/398510-cursor-movement-upon-event.html)

Mekinnik

Cursor movement upon an event
 
Lets say I have a worksheet with columns from A-G, when I enter a value into
column G I would like the cursor to move down 1 row and return to column B.
this would speed up my ability to enter my data in.

Tom Ogilvy

Cursor movement upon an event
 
Select columns A:G and then do you entry using the enter key or the tab key.
If the enter key does move right, then change it under tools-Options-Edit
tab under Move Selection after Enter

You can write a macro to do it, but seems like overkill to me if you can
exercise a little discipline.

--
regards,
Tom Ogilvy


"Mekinnik" wrote:

Lets say I have a worksheet with columns from A-G, when I enter a value into
column G I would like the cursor to move down 1 row and return to column B.
this would speed up my ability to enter my data in.


[email protected]

Cursor movement upon an event
 
Hi
Go into Tools, Macros, Visual Basic Editor. In the Project Explorer
Window on the left look for your excel file and double click the sheet
name where you want to enter data. In the blank code module that
appears paste this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("G:G"), Target) Is Nothing Then
Target.Offset(1, -5).Activate
End If
End Sub

regards
Paul

On Oct 2, 2:11 pm, Mekinnik
wrote:
Lets say I have a worksheet with columns from A-G, when I enter a value into
column G I would like the cursor to move down 1 row and return to column B.
this would speed up my ability to enter my data in.




Gary''s Student

Cursor movement upon an event
 
Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("G:G")
If Intersect(Target, r) Is Nothing Then Exit Sub
Cells(Target.Row + 1, "B").Select
End Sub

This is worksheet code and must be pasted in the worksheet code area, not a
standard module.
--
Gary''s Student - gsnu200748


"Mekinnik" wrote:

Lets say I have a worksheet with columns from A-G, when I enter a value into
column G I would like the cursor to move down 1 row and return to column B.
this would speed up my ability to enter my data in.



All times are GMT +1. The time now is 10:31 AM.

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