0

After pressing enter, is it possible to move the selection of the next cell as shown in the picture attached? Right now, when it reaches the 5th cell in the first column, and I press enter, it'll move to the 6th column. When I press enter, I want it to move to the 5th cell in the 2nd column or the 1st cell in the second column. Is this possible?

I understand I can click on it to move it, but this is for data entry, and I will save days if I don't have to keep clicking around.Cell movement

12
  • 2
    Select the entire range first.
    – BigBen
    Jun 4, 2019 at 19:42
  • 1
    No way (for the second) without VBA, but you can write code for WorkSheet_SelectionChange. The suggestion of @BigBen gives you the first and is much easier. Jun 4, 2019 at 19:43
  • 1
    Although someone provided a code snippet as an answer, the basis of this question is not programming related. This would have been an appropriate question for Super User. Jun 4, 2019 at 19:47
  • @BigBen can I select and lock the range for multiple tables? Jun 4, 2019 at 19:55
  • You can select multiple ranges, yes, and this will still work. Not sure what you mean by "lock" though.
    – BigBen
    Jun 4, 2019 at 19:57

2 Answers 2

2

If you select the entire range first, Enter will traverse the range in the first manner.

If you want to use this approach for a multi-range selection, perhaps just name the selection, and then you can easily select it from the dropdown:

enter image description here

1
  • I had never noticed the dropdown there. I usually access through F5
    – nutsch
    Jun 4, 2019 at 21:30
1

Ayou can right-click the tab, View Code and write something like this in an event:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Selection.Row > 5 Then Cells(1, Selection.Column + 1).Select

End Sub
2
  • Thanks, what "tab" are you talking about though?
    – Dinukaperera
    Jun 4, 2019 at 19:49
  • 1
    @Dinukaperera - If you right click the Worksheet Tab (usually says like "Sheet1" by default), you add the code in there. (As opposed to a Workbook Module)
    – BruceWayne
    Jun 4, 2019 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .