Excel: 如何不按ENTER 的情況下跳下一格?

2010-01-10 3:09 am
我需要在EXCEL輸入大量數字, 0-5, 每格一個數.
如果每輸入一個次按一下ENTER, 會入得好慢.
請問如何在不按ENTER 的情況下, 輸入(0-5)後自動跳下一格?

回答 (2)

2010-01-10 6:00 am
✔ 最佳答案
版大要這樣子嗎?
按1,該格輸入1,並自動跳落下格(或右格)
按2,該格輸入2,並自動跳落下格(或右格)

這個須要用vba設立快速鍵。

2010-01-09 22:00:06 補充:
請將以下8個程式,放入 VBE 的模組(modules),執行 Sub make_hotkey() (其他7個不用執行)。
由於鍵盤上方數字與鍵盤右邊的數字內碼不同,所以每個數字要設2個快速鍵。
如要按鍵後向右移,則改
Sub cell_shift()

Selection.Offset(1, 0).Select

End Sub

Sub cell_shift()


Selection.Offset(0, 1).Select


End Sub



Sub make_hotkey()

Application.OnKey "{96}", "key0"
Application.OnKey "{97}", "key1"
Application.OnKey "{98}", "key2"
Application.OnKey "{99}", "key3"
Application.OnKey "{100}", "key4"
Application.OnKey "{101}", "key5"

Application.OnKey "0", "key0"
Application.OnKey "1", "key1"
Application.OnKey "2", "key2"
Application.OnKey "3", "key3"
Application.OnKey "4", "key4"
Application.OnKey "5", "key5"

End Sub

Sub cell_shift()
Selection.Offset(1, 0).Select
End Sub

Sub key0()
Selection = 0
Call cell_shift
End Sub

Sub key1()
Selection = 1
Call cell_shift
End Sub

Sub key2()
Selection = 2
Call cell_shift
End Sub

Sub key3()
Selection = 3
Call cell_shift
End Sub

Sub key4()
Selection = 4
Call cell_shift
End Sub

Sub key5()
Selection = 5
Call cell_shift
End Sub

2010-01-09 22:02:29 補充:
關掉excel就會停止快速鍵。
2010-01-10 4:20 am
按shift enter
ok啦
cmccmcmcm


收錄日期: 2021-04-13 21:17:01
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20100109000051KK01308

檢視 Wayback Machine 備份