Imagine you have dozens of worksheets in an Excel file. In order to view a specific one, you will need to scroll right until finding that worksheet. Let’s say you finally find it. In order to come back, you will have to spend a similar amount of effort.
By using the macros below, you can navigate between worksheets easily. Just press the shortcut and Excel will take you there.
- Ctrl + R: Go to first worksheet
- Ctrl + L: Go to last worksheet
- Ctrl + T: Go to a specific worksheet (It will ask you a number)
Sub JumpRequirements() Sheets(2).Activate End Sub Sub JumpLast() Sheets(Sheets.Count - 2).Activate End Sub Sub JumpSpecificTab() On Error GoTo NotValidInput number = InputBox("Requirement Number:") Sheets(number + 4).Activate NotValidInput: 'MsgBox ("Invalid value") End Sub
In order to map shortcuts with macros, click “Options” button in “Excel ribbon > Developer > Macros” window and define the shortcut you want to use for that particular macro.
You don’t see “Developer” toolbar in Excel? Go to “File > Options > Customize Ribbon” and select “Developer” on the right-hand side list: