In case you prefer reading a tutorial over watching a video, below is a detailed written tutorial on unhiding sheets in Excel. When you work with data that is spread across multiple worksheets in Excel, you may want to hide a few worksheets. This could be to avoid the clutter or to not show some data to your client/manager by hiding some worksheets and only keeping the useful ones visible. And in some cases, you may have a workbook that has some hidden sheets and you want to unhide some or all of these worksheets. In this tutorial, I will show you some methods to unhide worksheets in Excel (manually as well as automatically using VBA). I will also show you how to selectively unhide worksheets based on the name or a condition. So let’s get started!
Unhiding Sheets Manually
If you only have a few worksheets that are hidden, you can manually unhide some or all of these worksheets. Suppose you have an Excel workbook that has 10 worksheets that are hidden. Below are the steps to manually unhide worksheets (one at a time): The above steps would unhide the select worksheet. Note: Unfortunately, there is no in-built functionality in Excel to quickly unhide all the hidden worksheets (or a way to select more than one worksheet and unhide it). As of now, you need to use the unhide dialog box where you can only select one worksheet to unhide. While there is no-inbuilt functionality to unhide in bulk, you can easily do this with a simple VBA macro code. If you want to hide worksheets, you can select multiple worksheets at once (hold the control key and click on the worksheet tab name), right-click and click on the Hide option. Unfortunately, there is no in-built functionality in Excel to quickly unhide all the hidden worksheets (or a way to select more than one worksheet and unhide it). As of now, you need to use the unhide dialog box where you can only select one worksheet to unhide.
Unhide All Sheets At One Go
With VBA, you can easily unhide worksheets in bulk. For example, if you have 10 hidden worksheets, you can create a simple VBA code to unhide all the worksheets or you can unhide based on a condition (such as unhide only those where there is a specific prefix or year in the name). Note: The methods covered in this tutorial doesn’t require you to save an Excel workbook in a macro-enabled format (.XLSM) to use the VBA code.
Using Immediate Window
VB Editor in Excel has an immediate window where you can type a line of code and instantly execute it right away. Below are the steps to use this above line of code to unhide sheets through immediate window: That’s it! The above steps would instantly unhide all the sheets in the workbook. Once done, you can close the VB Editor. Let me also quickly explain the below VBA code that we have used in the immediate window to unhide sheets: The above code uses a For Next VBA loop to go through all the sheets in the workbook and set the visible property to TRUE. Once the visible property of all the sheets is changed, the code will end. The colon (:) used in the code above is equivalent to a line break. While it looks like a single line of code, it has three parts to it which are separated by two colons. If you’re interested in learning more about the immediate window and some awesome things you can do with it, here is a detailed tutorial about it.
By Adding Macro to QAT (with One Click)
In case you have to unhide worksheets quite often, another good way could be to have the macro code to unhide sheets in the Personal macro workbook and save the icon in the Quick Access Toolbar. This is just a one time process and once you have it done, you can then unhide sheets in any workbook by simply clicking on a button in the QAT. This is by far the most efficient way to unhide sheets in Excel (most useful when you get a lot of workbooks with hidden sheets and you have to unhide these). The trick here is to save the code to unhide sheets in the Personal Macro Workbook. A Personal Macro Workbook is something that is always open when you open any Excel file (you can’t see it though). When you save a macro code to the Personal Macro workbook, this code is now always available to you. And when you add this to the QAT and you run the macro code with a single click. Below is the code that you need to add to the Personal Macro Workbook: Below are the steps to add this code to the Personal Macro Workbook: The above steps allow you to make the Personal Macro Workbook visible in the VB Editor and place the code to unhide sheets in it. Now all you need to do is add this code to the Quick Access Toolbar so that you can use it anytime from any workbook. Below are the steps to add this code to the Quick Access Toolbar: The above steps would add this macro code to unhide sheets in the Quick Access Toolbar.
Now, whenever you get a workbook that has some sheets hidden, you just need to click on the code icon in the QAT and it will instantly unhide all sheets in one go.
Unhide Sheets With Specific Text in the Name
With VBA, you can also unhide sheets based on the name. For example, suppose you have a workbook that contains sheets with years in the name and you want to unhide all the ones where the year is 2020. You can use the below code to unhide all the sheets with the text 2020 in it: The above uses the For Next loop to go through each worksheet in the workbook. The IF Then condition then checks the name of the worksheet and if it contains the specified text (which is 2020 in this code), it will change the visible property to make it visible. And if the name doesn’t contain the specified text, it will leave it as is. You can also modify this code to hide sheets based on the text in the name. For example, if you want to quickly hide all the worksheets where the name contains the text ‘2020’ in it, you can use the below code: Note: You can save this code in a regular module inside VB Editor or you can save this in the Personal Macro Workbook. In case you save it in a regular module and need to use it again later, you need to save the workbook as a macro-enabled workbook (.XLSM format).
Unhide Selected Sheets (Based on User Selection)
You can also use VBA to give the user the flexibility to choose whether to unhide a sheet or not. This can be done by showing a message box that asks the user to select whether to unhide a sheet or not. If selected, it unhides that sheet, else it moves to the next one. Below is the code that will do this: The above code goes through each sheet in the workbook and checks whether it’s already visible or not. If it’s hidden, then it shows the message box with the name of the worksheet. As a user, you can now decide whether you want to keep this sheet hidden or unhide it. This can work well if you have some worksheets that are hidden and you want to take a call for every sheet individually. Note: You can save this code in a regular module inside VB Editor or you can save this in the Personal Macro Workbook. In case you save it in a regular module and need to use it again later, you need to save the workbook as a macro-enabled workbook (.XLSM format). Here is a tutorial where I show how to save the code in the regular module in Excel (search for the ‘Where to put this code’ section in this article)
Unhide All or Selected Sheets Using Custom View
This is a less known method in case you want to quickly unhide all the worksheets (or some selected worksheets). ‘Custom View’ is functionality in Excel that allows you to create and save views that you can quickly resort to with a click of a button. For example, suppose you have an Excel workbook with 10 worksheets. You can create a view where all these 10 sheets are visible. In the future, if you have some sheets hidden and you want o go back to the view where all the sheets were visible, you can do that by selecting the already saved custom view. Don’t worry, you don’t lose any changes you made after creating the custom view. All custom view does is takes you back to the Excel view when you created it. So if some worksheets were visible when you created the view and are now hidden, selecting that custom view would unhide these sheets. The intended use of Custom View is to allow users to create different views. For example, if you’re an analyst, you can create different views for different departments in your organization. So you can have a specific set of worksheets (or cells/rows/columns) visible for one department and another set for another department. Once you have these views, instead of changing this manually, you simply activate the view for a department and it will show you worksheets (or rows/columns) relevant for them only. Below are the steps to create a custom view in Excel: Once the view is created, you can anytime ask Excel to activate this view (which would make all those sheets visible that were visible when you created the view). Below are the steps to show/activate a custom view: This would instantly unhide sheets and show those that were visible when you created that custom view.
Unhiding Sheets that are ‘Very Hidden’
Sometimes, despite having some hidden sheets in your workbook, you would not be able to unhide it manually. This could be because these sheets are not just hidden – these are ‘very hidden’. When you have hidden sheets in a workbook and you right-click on any tab name, you would see the option to ‘Unhide’ sheets. But if you have sheets are ‘very hidden’ or if there are no hidden sheets, then you would not be able to use this option (it will be greyed out). You can still unhide these ‘very hidden’ sheets by using the VBA code that we have covered above. Just copy-paste the below code in the immediate window and hit enter and it would instantly unhide all the sheets (hidden as well as very hidden). I also have a full tutorial on how to hide sheets and make these very hidden (in case you’re interested in learning) You may also like the following Excel tutorials:
How to Quickly Unhide COLUMNS in Excel How to Rename a Sheet in Excel Delete Rows Based on a Cell Value (or Condition) in Excel Hide Zero Values in Excel Working with Worksheets using Excel VBA How to Group Worksheets in Excel How to Delete All Hidden Rows and Columns in Excel Excel Tabs/Sheets Not Showing – How to Fix?