- ·上一篇教育:excel表格表空白格怎么样画横线
- ·下一篇教育:excel表格上面怎么固定
excel表格回车键怎么弄到后面
1.如何在excel中回车后让单元格移动到我想要的位置
再试试看,该满意了吧!!!
别忘了给分哦!
假如输入顺序是:a1---c5---p2---L5---L7---I10---O14
在代码窗口(工具/宏/Visual basic编辑器)粘贴以下代码:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = 1 And ActiveCell.Column > 1 Then
Cells(5, 3).Select
End If
If ActiveCell.Row = 5 And ActiveCell.Column > 3 And ActiveCell.Column < 5 Then
Cells(2, 16).Select
End If
If ActiveCell.Row = 2 And ActiveCell.Column > 16 Then
Cells(5, 12).Select
End If
If ActiveCell.Row = 5 And ActiveCell.Column > 12 Then
Cells(7, 12).Select
End If
If ActiveCell.Row = 7 And ActiveCell.Column > 12 Then
Cells(10, 9).Select
End If
If ActiveCell.Row = 10 And ActiveCell.Column > 9 Then
Cells(14, 15).Select
End If
If ActiveCell.Row = 14 And ActiveCell.Column > 15 Then
Cells(1, 1).Select
End If
End Sub
保存后,设置工具/选项/编辑/按enter键后移动:方向"向右"
搞定!!
注:工具/宏/安全性应该为"中",否则再次打开后代码就不起作用了