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 30-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.

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

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.

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 tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now


Kutools for Excel includes more than 300 handy tools for Excel, free to try without limitation in 30 days. Download and Free Trial Now!

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 30-day!

ad navigation pane book sheet 1



Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
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 · 1 years 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 · 2 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 · 2 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 · 3 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?
    • To post as a guest, your comment is unpublished.
      Adam · 5 months ago
      I keep getting the same error, I would love for this to work!