Is there a keyboard shortcut to directly go to first/last worksheet in Microsoft Excel without cycling through all with Ctrl+PgUp/PgDn?
4 Answers
In Excel 2013, hold down ctrl when clicking the "next worksheet" arrow buttons on the screen to scroll to the first/last sheet. I'm not sure about previous versions of Excel.
- 825
- 4
- 12
- 21
-
11Just to clarify, the answer below. Hold Ctrl and click the "next worksheet" arrow icon on the screen, or "previous worksheet" arrow icon. Not the arrow keys on the keyboard. So no short-cut key I can find unfortunately. – Oct 02 '14 at 07:47
If you're up for inserting your own VBA, these two macros will do this. Insert these into a standard code module. See How do I add VBA in MS Office? for detailed guidance. The short version: type Alt+F11 to open the VBA editor, then select "Insert" → "Module".
Sub JumpFirst()
Sheets(1).Activate
End Sub
Sub JumpLast()
Sheets(Sheets.Count).Activate
End Sub
Then close the editor. Then, on the "Developer" tab, click "Macros" and click on one of these new macros, click on "Options..." and set the hotkey you want to use. (It must be Ctrl + a letter.) Repeat with the other macro.
Now you have to hotkeys to jump to first and last.
If the VBAProject you insert the module in the PERSONAL.XLS workbook, then these macros will be available at all times in all workbooks.
- 515
- 2
- 7
As of Excel 2010 there is no direct shortcut for jumping to the first/last worksheet:
An alternative method would be to use the Go To dialog box. Hit F5 and enter:
SHEET_NAME!CELL_NO
Example:
Sheet2!A1
This will move your selection to cell A1 in sheet named Sheet2.
- 137
- 7
There is no native keyboard shortcut to go to first/last worksheet in Excel.
Here is an AutoHotkey script that will let you do it with Ctrl+Shift+PgUp/PgDn
#IfWinActive ahk_class XLMAIN
^+PgUp:: ;-- Jump to the first visible sheet
xlApp := ComObjActive("Excel.Application") ; Creates a handle to your currently active Excel sheet
try xlApp.Sheets(1).Activate ; Can use index or specific name
SoundBeep 523, 150 ; Let me know the ahk script is working.
return
^+PgDn:: ;-- Jump to the last visible sheet
xlApp := ComObjActive("Excel.Application") ; Creates a handle to your currently active Excel sheet
try xlApp.Sheets(xlApp.Sheets.count).Activate ; Can use index or specific name
SoundBeep 262, 150 ; Let me know the ahk script is working.
return
#IfWinActive
The try statement is there to ignore the error if the action fails, as in the case if you are editing a formula when you press the hotkey.
- 353
- 4
- 11
-
1Thank you so much for showing how access the COM interface (or rather excel) through Autohotkey. I am glad to know that this is possible in AutoHotkey. – mouwsy Feb 10 '23 at 22:44