Move to column A after enter

AC

Board Regular
Joined
Mar 21, 2002
Messages
153
I want to move to column A one row down when I hit enter or the arrow keys after I enter data in column E, this will take me there when the column is selected, but I need to be able to enter data in this cell first. Can this be done? Thanks, excel ‘97

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'moves to column A one row down when column E is selected
With ActiveCell
Select Case .Column
Case 5 'Column E
'If Not (.HasFormula Or .Text <> "") Then
ActiveCell.Offset(1, -4).Select
'End If
End Select
End With

End Sub
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Use the Worksheet Change event instead of the Worksheet Selection Change. Something like

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column<> 5 Then Exit Sub
Target.Offset(1, -4).Select
End Sub

HTH
This message was edited by lenze on 2002-10-30 10:41
 

Forum statistics

Threads
1,144,329
Messages
5,723,736
Members
422,512
Latest member
MHau5

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top