• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Unhide Multiple Worksheets in Excel

You are here: Home / Excel VBA / Unhide Multiple Worksheets in Excel
Unhide Multiple Worksheets in Excel
April 1, 2014 by Mynda Treacy

I’m sure most of us have experienced frustration at Excel’s refusal to allow us to unhide multiple worksheets.

This is no April Fools' joke! I know it seems illogical to allow the hiding of multiple sheets but not the un-hiding.

Ho, hum....here are a couple of easy fixes:

1. Custom Views

A custom view is a snapshot of how the workbook looks, in terms of structure not content, at a point in time.

So, all you need to do is create a custom view of your workbook with all of the sheets unhidden, then you can merrily hide the sheets in the knowledge that you can quickly unhide them again by selecting your 'custom' view of the workbook.

To create a Custom View first make sure all of your sheets are unhidden > on the View tab select Custom Views > click ‘Add’ in the dialog box:

Use Custom View to unhide multiple sheets

In the ‘Add View’ dialog box give your Custom View a name:

give your custom view a name

Tip: if you keep the ‘Print Settings’ and ‘Hidden rows, columns and filter settings’ checked then when you ‘Show’ your Custom View Excel will unhide any hidden rows/column and filters will be removed.

Ok, now you’ve set up your Custom View you can quickly unhide your sheets by selecting it:

View tab > Custom Views > double click the view you want or click the ‘Show’ button:

show custom view

Note: Custom Views are specific to each Workbook. i.e. If you want to be able to easily unhide multiple sheets in other workbooks you will need to set up a Custom View in each workbook.

If this annoys you too then maybe the next option is for you.

2. VBA to Unhide Multiple Sheets

Now, Custom Views are fine if you already have your sheets unhidden, but what if you have inherited a workbook with 100 hidden sheets? What?....100 hidden sheets is possible!

Well, you still have to unhide them before you can set up your Custom View.

So, here is some VBA code that will unhide all sheets quickity quick:

Option Explicit

Sub UnhideAllSheets()

   Dim HiddenSheet As Worksheet

   For Each HiddenSheet In ActiveWorkbook.Worksheets

     HiddenSheet.Visible = xlSheetVisible

   Next HiddenSheet

End Sub

Go ahead and paste it into your Personal Macro Workbook so it’s there for you to use whenever you need.

To add the VBA code to your Personal Macro Workbook:

  1. Alt+F11 to open the VB Editor, or click on the Developer Tab and click on the Visual Basic icon > locate the ‘PERSONAL.XLSB’ project > right click and Insert a Module (if you don’t already have one):

    add VBA module

  2. Then paste in the code from above in the right hand side of the VB editor:

paste in VBA

Add an Icon to your Quick Access Toolbar

Since you’re on a roll why not set up an icon on the Quick Access Toolbar (QAT) so it’s always to hand?

quick access toolbar QAT

To do this right click the QAT > select ‘Customize the Quick Access Toolbar’:

  1. Choose ‘Macros’ in the ‘Choose commands from' list
  2. Double click the Macro to add it to your QAT or click the 'Add' button:

add icon to QAT

Now Make it Funky

You can even give your shortcut a funky icon so you can easily identify it.

choose icon for qat shortcut

Unhide Multiple Worksheets in Excel

More Excel VBA Posts

automating and emailing pivot table reports

Automating and Emailing Pivot Table Reports

Automate the creation and distribution of pivot table reports with some VBA. Send reports to multiple email recipients using Outlook.
Checking values in range objects with vba

Checking Values in Range Objects With VBA

Use built in tools or your own code to examine the values contained within Range objects in VBA. Sample code to download.
Static variables in VBA

Static Variables in VBA

Variables normally cease to exist once your Sub or Function has ended. But Static Variables allow you to preserve values after your code has finished.
save chart as image

Save Chart as Image

List all the charts in your workbook then select the ones you want to save as either PNG or JPG. Sample workbook and code to download
Clearing Downstream Dependent Data Validation Lists

Clear Downstream Dependent Data Validation Lists

Change one of your data validation lists and clear the values in the other data validation lists dependent on your first choice.
Excel Status Bar

Excel Status Bar

Use the Excel Status Bar to send messages to your users and to show a progress bar for your VBA code
Progress Bar for Excel VBA

Excel Progress Bar for VBA

Create your own progress bar for VBA in Excel. Use it to show that your code is still running, and how long before it finishes.
error handling in vba

Error Handling in VBA

Understand how Excel VBA generates errors, how to control what Excel does when an error occurs, and how to write your own error handling routines.
Finding File Metadata Using FileSystemObject

Finding File Meta Data Using FileSystemObject

Find file meta data like the creation date, last modified date and file size using Windows FileSystemObject in Excel VBA
Automatically Add Items to Data Validation List

Automatically Add Items to Data Validation List

Automatically Add Items to Data Validation List by typing in the new data. Then sort the source list for bonus points

More Excel VBA Posts

Display All Matches from Search in Userform ListBox

Display All Matches from Search in Userform ListBox

Search a range for all partial and full matches of a string, and display matching records (entire rows) in a userform listbox. Sample code and userform.
animating excel charts

Animating Excel Charts

Use animation correctly to enhance the story your data is telling. Don't animate your chart just for some eye candy. Sample code and workbook to download.
dynamic data validation lists in userforms

Dynamic Data Validation Lists in Userforms

Data validation lists using the same source that are dynamically modified to prevent the same choice being made in each list.
show report filter pages for power pivot pivottables

Show Report Filter Pages for Power Pivot PivotTables

PivotTables created from Power Pivot can't use the 'Show Report Filter Pages' option. But this piece of VBA allows you to do just that.
charting real time data in excel

Charting Real Time Data in Excel

Receive data in real time and chart the data as it arrives. Can be used to chart things like stock prices or sensor readings. Sample code and workbook
select multiple items from drop down data validation list

Select Multiple Items from Drop Down (Data Validation) List

Choose multiple items from a data validation (drop down) list and store them all in the same cell. Sample workbook with working VBA.
Excel Calendar (Date Picker) to Use in Worksheets and Userforms

Multi-Language Excel Calendar (Date Picker) for Worksheets and Userforms

Easy to use, highly customizable and multi-language. This date picker is implemented as a userform that is simple to integrate into your workbook.
automating and emailing pivot table reports

Automating and Emailing Pivot Table Reports

Automate the creation and distribution of pivot table reports with some VBA. Send reports to multiple email recipients using Outlook.
search for data with userform

Searching for Data With a User Form

Search a list of records (like a table) using a user form, and then populate the fields of the search form when the record is found.
Checking values in range objects with vba

Checking Values in Range Objects With VBA

Use built in tools or your own code to examine the values contained within Range objects in VBA. Sample code to download.


Category: Excel VBATag: Excel VBA
Previous Post:Create a Personal Macro Workbook PERSONAL.XLSBCreate a Personal Macro Workbook PERSONAL.XLSB
Next Post:Trusted LocationsTrusted Locations

Reader Interactions

Comments

  1. Wiz

    April 2, 2021 at 4:28 pm

    Update: Unhiding multiple sheets in Excel is now possible. See https://techcommunity.microsoft.com/t5/excel-blog/unhide-multiple-worksheets/ba-p/2234073

    Reply
    • Mynda Treacy

      April 2, 2021 at 4:51 pm

      Sure is, but only if you have Microsoft 365.

      Reply
  2. Sam

    August 15, 2017 at 7:12 pm

    Hi. Thanks for the information. This is indeed very helpful! However, I encounter a problem with the icon/ribbon created. If I change the file name or relocate location of file, the ribbon no longer work. It always refer back to the previous file name at the previous location. May I know how to solve this issue so that the ribbon can follow the path though file name or location is changed?

    Reply
    • Catalin Bombea

      August 22, 2017 at 6:14 pm

      Hi Sam,
      Are you using exactly the same code described in this article or you made changes? I’m asking this because the code provided in this article is referring to ActiveWorkbook, not to a specifc file.
      Can you upload your code so we can take a look at it?
      Catalin

      Reply
  3. ashish

    April 13, 2015 at 10:37 pm

    If you are interested in learning How to Hide Multiple Sheets using VBA

    Reply
  4. Cathy

    August 18, 2014 at 11:22 am

    Such a shame that Custom Views is “greyed out” when there is a table anywhere in the workbook. Worked around it with a simple macro for each custom view.

    Reply
    • Mynda Treacy

      August 18, 2014 at 12:03 pm

      Yes, it is annoying. Hopefully they’ll fix that in an upcoming version of Excel.

      Glad you found a workaround though.

      mynda

      Reply
  5. Garvin Gilbert

    May 8, 2014 at 6:53 am

    What I am trying to do is only have my dashboard visible and hide all other sheets, is there any way to link a formula to a hidden tab or create a hyperlink on your dashboard to a hidden sheet?

    Reply
    • Mynda Treacy

      May 8, 2014 at 8:14 am

      Hi Garvin,

      You can link formulas to hidden sheets but you can’t have a hyperlink to a hidden sheet.

      Kind regards,

      Mynda.

      Reply
  6. Jeff Weir

    April 5, 2014 at 7:36 am

    Hi Mynda. Helpful post. Note that Custom Views are incompatible with Excel Tables. As soon as you have a Table in your spreadsheet, the Custom Views option is greyed out. Which is a shame, because Custom Views is about the best unknown feature that MS have effectively depreciated.

    Regards from across the Tasman.
    Jeff

    Reply
    • Mynda Treacy

      April 5, 2014 at 11:48 am

      Thanks for dropping by, Jeff 🙂

      Good point about the Tables, which I forgot to mention. Indeed, it is a huge shame. I’m a big fan of Tables. At least we still have the VBA option… for now!

      Cheers,

      Mynda.

      Reply
  7. Jerry

    April 1, 2014 at 9:16 pm

    Great timesaver! I generated a similar snippet previously with some wholly unnecessary bells/whistles: (The bookmark ensures you end up on the worksheet you started on)

    Sub UnhideAllWorksheets()

    Dim i As Long, j As Long, ws As Long, hidden As Long
    Dim Bookmark As Object
    Set Bookmark = ActiveSheet
    hidden = 0
    ws = ActiveWorkbook.Sheets.Count
    For i = 1 To ws
    If Sheets(i).Visible = False Then hidden = hidden + 1
    Next
    If hidden = 0 Then MsgBox (“There are no hidden sheets in this workbook.”)
    If hidden = 0 Then Exit Sub
    If MsgBox(“There are ” & ws & ” total sheets in this workbook.” & vbCrLf & vbCrLf & _
    “Do you want to expose the ” & hidden & ” hidden sheets?”, _
    vbQuestion + vbYesNo) vbYes Then Exit Sub
    For j = 1 To ws
    Sheets(j).Visible = True
    Next
    MsgBox (“All sheets are now visible”)
    Bookmark.Activate
    End Sub

    Reply
    • Mynda Treacy

      April 1, 2014 at 10:45 pm

      Cheers, Jerry. Thanks for sharing 🙂

      Mynda.

      Reply
  8. Bruce

    April 1, 2014 at 7:41 pm

    Or you can get the Excel Utilities Add-in for free and remove multiple worksheets that way.

    Reply
    • Mynda Treacy

      April 1, 2014 at 8:01 pm

      Hi Bruce,

      I presume you mean an add-in to ‘unhide’ not ‘remove’ multiple sheets? Any particular add-in? There are a few out there. Can you share the link?

      Cheers,

      Mynda.

      Reply
  9. richard smith

    April 1, 2014 at 6:51 pm

    Hi
    I have uploaded the code, but I receive an error as follows: –
    Compile error variable not defined Hidden sheet
    Please can you help?

    Reply
    • Mynda Treacy

      April 1, 2014 at 8:23 pm

      Oops, sorry Richard. There was a typo in the VBA code. I’ve fixed it now so you can copy it from above and try again.

      Kind regards,

      Mynda.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.