moving cells in Excel

G

Guest

Hi Guys

Been having trouble with what seemed like a simple macro to write!. I want
to have an excel sheet where if a value is entered in Column H; the next cell
beside it in column I is selected for data entry. If Data is entered in any
cell in I it then moves down a cell and back 1 cell to the next cell in
column H.

e.g. enter data in cell H1 -> I1 becomes active cell
Enter data in I1 -> H2 becomes active cell
Enter datain H2 -> I2 becomes active cell
etc

Your help would be much appreciated!!
 
D

Don Guillett

right click sheet tab>view code insert this>save

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 8 Then Target.Offset(0, 1).Select
If Target.Column = 9 Then Target.Offset(1, -1).Select
End Sub
 

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