发布网友 发布时间:2022-05-05 22:26
共2个回答
热心网友 时间:2022-06-28 05:19
用下面代码
Dim i As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row = 2 And Target.Column = 1 Then
If i <> 4 Then
i = Target.Row
Cells(3, 2).Select
End If
ElseIf Target.Row = 3 And Target.Column = 3 Then
i = Target.Row
Cells(6, 4).Select
ElseIf Target.Row = 4 And Target.Column = 4 Then
i = Target.Row
Cells(2, 1).Select
ElseIf Target.Row = 1 And Target.Column = 1 Then
i = Target.Row
End If
End Sub
怎样使用参考
Excel只能选取规定列单元格怎样处理
热心网友 时间:2022-06-28 05:19
先同时选定A1:A2,紧接着输入数据并回车,这时,活动单元格由A1跳转到A2,又输入数据并回车,这时的活动单元格又由A2跳转到A1,……如此反复。