如果是用宏的话,可以在模块中插入以下:
Sub auto_open()
Application.OnKey "{ENTER}", "liyoushang2"
Application.OnKey "~", "liyoushang2"
'Application.MoveAfterReturnDirection = xlUp Application.MoveAfterReturn = True
'xlDown xlToLeft xlToRight xlUp
End Sub
Sub liyoushang2()
Application.MoveAfterReturn = True
Application.MoveAfterReturnDirection = xlDown
aa = ActiveCell.Column
If aa = 1 Then
ActiveCell.Offset(0, 1).Select
End If
If aa = 2 Then
ActiveCell.Offset(1, -1).Select
End If
End Sub
参考:
http://blog.sina.com.cn/s/blog_62b8abcd0100vsm9.html