Force Tab

J

Jamie

I am working in Excel 2002.

Currently I have a table (A1:U14), is there any way that I can apply coding
to a column, in this case, column U, so when I tab out of cell U14 the cursor
will go to the beginning of that row, cell A14. Or to the beginning of
whatever row I may be tabbing out of in column U.
 
O

Otto Moehrbach

I assume you are tabbing out of the U cell after you entered something in
that cell. If so, then a Worksheet_Change event macro will work for you.
Something like:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 21 Then _
Cells(Target.Row, 1).Select
End Sub

HTH Otto
 
J

Jamie

Thanks for the coding. Excuse my inexperience, I'm assuming I enter this
coding by creating a new macro, but how do I get it to run?
 
G

Gord Dibben

Jamie

Copy Otto's code which is worksheet event code and goes into the sheet module.

Right-click on the worksheet tab and "View Code".

Paste in there.

You do not "run" it. The Change_Event runs itself whenever you TAB or ENTER
out of a cell in Column U after you have entered data.


Gord Dibben Excel MVP
 
O

Otto Moehrbach

Thanks Gord. I should have included that but I was rushed at the moment.
Otto
 
J

Jamie

Gord and Otto: Thank you, thank you, thank you. It works like a charm. You
are awesome!!
 

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