Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to go back to previous/last sheet with shortcut in Excel?

Supposing there are dozens of worksheets in current workbook, and you want to go back to previous or last sheet to copy contents, or for other purposes. But now sheet names are congesting in the Sheet bar, and it’s hard to find out the previous sheet at a glance. So how to go back to previous/last sheet immediately with shortcut? Here are two tricks for you:

Go back to previous/last sheet with VBA (8 steps)

Go back to previous/last sheet by shortcut with Kutools for Excel (only one click)

Easily insert multiple hyperlinks (or macro buttons) to go to other worksheets in Excel

Normally we can insert a hyperlink to one sheet in one cell by Insert > Hyperlink in Excel. But, with magic Create List of Sheet Names feature of Kutools for Excel, we can quickly insert multiple hyperlinks or macro buttons to each worksheet of active workbook. Full Feature Free Trial 60-day!

ad create list of sheet names link

This Create List of Sheet Names utility also supports to batch insert multiple hyperlinks to go to each worksheet (or other worksheets) in current workbook.


The following VBA code enables you to switch between last used sheet and current sheet in current workbook. You can do as follows:

Step 1: Press Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

Step 2: Double click the ThisWorkbook in the left bar, and then paste the following code into the opening window:

VBA 1: Go back to previous/last sheet

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
LastSheet = Sh.Name
End Sub

Step 3: Keep selecting ThisWorkbook in the left bar, and then click Insert > Module, and paste following code into the opening Module window:

VBA 2: Go back to previous/last sheet

Public LastSheet As String
Sub Select_Last()
Application.Sheets(LastSheet).Select
End Sub

You can press F5 key or click the Run button to go back to the last used worksheet at once.

If you prefer to shortcuts to switch between current sheet and last used one, please go ahead:
Step 4: Click Developer > Macros to open the Macro dialog box.

Note: By default the Developer tab does not display in Ribbon, click to know how to show/display developer tab in Excel Ribbon.

Step 5: In the opening Macro dialog box, click to highlight the macro of Select Last, and then click the Options button.

Step 7: In the Shortcut key section, specify shortcut to run this macro of Select Last, and click the OK button to close dialog box.

Step 8: Close the Macro dialog box.

From now on, when you open several worksheets successively, you can press the specified shortcut keys (in our case press the Ctrl + b) to switch between current sheet and last/previous one.


If you have installed Kutools for Excel, you can apply its Switch between last and current sheet utility to go back to last sheet with ease in Excel.

Kutools for Excel - Combines more than 300 Advanced Functions and Tools for Microsoft Excel

Just click the  button in the Navigation Pane or press the Win + A keys simultaneously to switch between current sheet and last/previous one.

Note: After installing the Kutools for Excel, the Navigation Pane turns on by default. If you can’t find out the Navigation Pane, or the  button in the Navigation Pane, you can click the Kutools > Navigation (or View > Navigation) to activate the Navigation pane, and then click the  button in the far left of Navigation Pane.

Kutools for Excel - Includes more than 300 handy Excel tools. Full feature free trial 60-day, no credit card required! Get it now!


In this Video, the Kutools tab and the Kutools Plus tab are added by Kutools for Excel. If need it, please click here to have a 60-day free trial without limitation!


Navigation Pane: List all opening workbooks and vertical sheet tab for easily switching to any sheet

Kutools for Excel’s Navigation Pane lists all opening workbooks and corresponding worksheets vertically as below screenshots. (1) Clicking a workbook in the Workbook section will switch to this workbook window; (2) while clicking a worksheet in the Worksheet section will skip to open this worksheet. Full Feature Free Trial 60-day!

ad navigation pane book sheet 1



Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Udyd · 11 months ago
    First code in a while that doesn't work..
  • To post as a guest, your comment is unpublished.
    santhosh · 1 years ago
    Good morning sir/madam,Is there any option for change tab automatically after adding some no.s in excel without using keyboard.
  • To post as a guest, your comment is unpublished.
    Geebu · 1 years ago
    I use ctrl+{ to open the referenced formula cell which is another sheet..i want to go back to the last sheet directly (which is few sheet away from the current sheet) instead of using ctrl+pg up/down..thanks in advance.
    • To post as a guest, your comment is unpublished.
      kelly001 · 1 years ago
      Hi Geebu,
      In the first method of this article, you can customize the hotkeys as you need in the step 7. On the other hand, Kutools for Excel’s Navigation Pane is an easy and handy tools to return to last used sheet.
  • To post as a guest, your comment is unpublished.
    Muhammad · 1 years ago
    in this section "Go back to previous/last sheet with VBA" .How can i change the shortcut key to a command button? is there any way?
    • To post as a guest, your comment is unpublished.
      Tang Kelly · 1 years ago
      Hi Muhammad,
      You can assign the VBA for a button in the Quick Access Toolbar.
      1. Follow step 1-3 in the first method to add both VBA.
      2. Click File > Options > Quick Access Toolbar, select Macros from Choose commands from drop-down list, select the specified macro and add it to the right section. Below screenshot may help you understand it faster.

      3. Return to the Excel window, a button assigned to the specified macro is added in the Quick Access Tools.
  • To post as a guest, your comment is unpublished.
    Allyse · 2 years ago
    This tutorial is helpful, but in the section where it's showing you how to create a macro, I keep getting an error that says "Subscript out of range" in the third line. Do you know what's wrong with this script?