Hi all,
I've looked all over this board and the web and can't find the answer to this exact problem.
In a protected sheet, the unlocked cells are columns B through L. If the cursor is within columns E through L, after hitting Enter I need the cursor to move to cells in a particular column (to be exact: it needs to go one row down, column E).
I've figured out that if I do this...:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Select Case Target.Column
Case 5
Cells(Target.Row + 1, Target.Column).Select
Case 6
Cells(Target.Row + 1, Target.Column - 1).Select
Case 7
Cells(Target.Row + 1, Target.Column - 2).Select
Case 8
Cells(Target.Row + 1, Target.Column - 3).Select
Case 9
Cells(Target.Row + 1, Target.Column - 4).Select
Case 10
Cells(Target.Row + 1, Target.Column - 5).Select
Case 11
Cells(Target.Row + 1, Target.Column - 6).Select
Case 12
Cells(Target.Row + 1, Target.Column - 7).Select
Case Else
Exit Sub
End Select
End Sub
... I get half of the desired effect. Hitting Enter after inputting data in columns E through L takes me to the next row, column E.
However, I also need to be able to jump to the same place if I click on a cell (or tab to it) without inputting data (it may already have data, or may be blank), and hit Enter. What do I need to add / change?
The sheet's protected, some cells are locked and I can't use arrow keys or tab to get to the desired cell (the spreadsheet's been used for years, the users want "Enter", period). It has to be "hit Enter (with or without inputting data), go to row + 1, column E".
Thank you for any suggestions!
Kirk
Edit: it needs to work in Excel 2007 up to 365.
Bookmarks