pmeghnathi
Board Regular
- Joined
- Mar 11, 2018
- Messages
- 98
- Office Version
- 2003 or older
- Platform
- Windows
A1 cell data entry press enter key move direction A10,after press enter key to move B1, after to B10 pl.help
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("A:ZZ")) Is Nothing Then
If Target.Row = 2 Then
Target.Offset(8, 0).Select
Else
Target.Offset(-10, 1).Select
End If
End If
End Sub
ThanksYou could try something like this:
VBA Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range("A:ZZ")) Is Nothing Then If Target.Row = 2 Then Target.Offset(8, 0).Select Else Target.Offset(-10, 1).Select End If End If End Sub
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.Thanks