View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
patrick molloy patrick molloy is offline
external usenet poster
 
Posts: 391
Default Selecting a certain cell

use the sheet's change event:
Right click the sheet tab & select "View Code"
Add This:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 Then
Target.Offset(1, 0).Select
ElseIf Target.Row = 2 Then
Target.Offset(-1, 1).Select
End If
End Sub

HTH
Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
Hi!
I donīt get it although it seemd to be so simple.
I want that after I entered a word in column A1 the

cursor selects B1 and
after that A2 (and so on: B2-A3-B3...)

I tried it with this code but there seems to be a

problem with the default
cursor movement. Who can help?

Many thanks
Bernd

Sub auto_open()
Application.OnEntry = "start"
End Sub

Sub start()
If ActiveCell.Column = 1 Then
Cells(ActiveCell.Row, ActiveCell.Column +

1).Select
Else
If ActiveCell.Column = 2 Then
Cells(ActiveCell.Row + 1, ActiveCell.Column -

1).Select
End If
End Sub


.