Press Enter and Move Back to Column A Automatically

I

I Teach

I would like to be able to press Enter after I complete the entry in any cell
in any column and have the Enter key take me back to Column A in the next
row. This happens sometimes and I'd like to have it happen all the time.

Excel versions 2003 and 2007.

Thanks for your assistance in this matter.
 
G

Gary''s Student

Put this tiny event macro in the wroksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
i = Target.Row
Cells(i + 1, "A").Select
End Sub

Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm
 
G

Gord Dibben

Start in A1...........Tab your way across to G1

Leave G1 by hitting ENTER key.

You are now at A2


Gord Dibben MS Excel MVP
 
C

Chip Pearson

Just on the off chance that there is a SelectionChange event floating
about somewhere, you should turn off events.

Application.EnableEvents = False
i = Target.Row
Cells(i + 1, "A").Select
Application.EnableEvents = True

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top