Hidden worksheets in excel

Hide or unhide a worksheet

Note: The screen shots in this article were taken in Excel 2016. If you have a different version your view might be slightly different, but unless otherwise noted, the functionality is the same.

  1. Select the worksheets that you want to hide.

    How to select worksheets

    To select

    Do this

    A single sheet

    Click the sheet tab.

    Worksheet tabs at the bottom of the Excel window

    If you don’t see the tab that you want, click the scrolling buttons to the left of the sheet tabs to display the tab, and then click the tab.

    Two or more adjacent sheets

    Click the tab for the first sheet. Then hold down Shift while you click the tab for the last sheet that you want to select.

    Two or more nonadjacent sheets

    Click the tab for the first sheet. Then hold down Ctrl while you click the tabs of the other sheets that you want to select.

    All sheets in a workbook

    Right-click a sheet tab, and then click Select All Sheets on the shortcut menu.

    Tip: When multiple worksheets are selected, [Group] appears in the title bar at the top of the worksheet. To cancel a selection of multiple worksheets in a workbook, click any unselected worksheet. If no unselected sheet is visible, right-click the tab of a selected sheet, and then click Ungroup Sheets on the shortcut menu.

  2. On the Home tab, in the Cells group, click Format > Visibility > Hide & Unhide > Hide Sheet.

    Hid or unhide worksheets from Home > Cells > Format > VIsibility > Hide & Unhide

  3. To unhide worksheets, follow the same steps, but select Unhide. You’ll be presented with a dialog box listing which sheets are hidden, so select the ones you want to unhide.

    Unhide sheets dialog

    Note: Worksheets hidden by VBA code have the property xlSheetVeryHidden; the Unhide command will not display those hidden sheets. If you are using a workbook that contains VBA code and you encounter problems with hidden worksheets, contact the workbook owner for more information.

Hide or unhide a workbook window

  • On the View tab, in the Window group, click Hide or Unhide.

    On a Mac, this is under the Window menu in the file menu above the ribbon.

    Hide or show a workbook from View > Windows > Hide/Unhide

Notes: 

  • When you Unhide a workbook, select from the list in the Unhide dialog box.

    Unhide windows dialog

  • If Unhide is unavailable, the workbook does not contain hidden workbook windows.

  • When you exit Excel, you will be asked if you want to save changes to the hidden workbook window. Click Yes if you want the workbook window to be the same as you left it (hidden or unhidden), the next time that you open the workbook.

Hide or display workbook windows on the Windows taskbar

Excel 2013 introduced the Single Document Interface, where each workbook opens in its own window.

  1. Click File > Options.

    For Excel 2007, click the Microsoft Office Button Office button image, then Excel Options.

  2. Then click Advanced > Display > clear or select the Show all windows in the Taskbar check box.

Hide or unhide a worksheet

  1. Select the worksheets that you want to hide.

    How to select worksheets

    To select

    Do this

    A single sheet

    Click the sheet tab.

    Worksheet tabs at the bottom of the Excel window

    If you don’t see the tab that you want, click the scrolling buttons to the left of the sheet tabs to display the tab, and then click the tab.

    Two or more adjacent sheets

    Click the tab for the first sheet. Then hold down Shift while you click the tab for the last sheet that you want to select.

    Two or more nonadjacent sheets

    Click the tab for the first sheet. Then hold down Command while you click the tabs of the other sheets that you want to select.

    All sheets in a workbook

    Right-click a sheet tab, and then click Select All Sheets on the shortcut menu.

  2. On the Home tab, click Format > under Visibility > Hide & Unhide > Hide Sheet.

  3. To unhide worksheets, follow the same steps, but select Unhide. The Unhide dialog box displays a list of hidden sheets, so select the ones you want to unhide and then select OK.

    Unhide sheets dialog

Hide or unhide a workbook window

  • Click the Window menu, click Hide or Unhide.

Notes: 

  • When you Unhide a workbook, select from the list of hidden workbooks in the Unhide dialog box.

    Unhide windows dialog

  • If Unhide is unavailable, the workbook does not contain hidden workbook windows.

  • When you exit Excel, you will be asked if you want to save changes to the hidden workbook window. Click Yes if you want the workbook window to be the same as you left it (hidden or unhidden) the next time that you open the workbook.

Hide a worksheet

  1. Right click on the tab you want to hide.
    Hide tab in Excel for the web

  2. Select Hide.

Unhide a worksheet

  1. Right click on any visible tab.

  2. Select Unhide.
    Unhide in Excel for the web

  3. Mark the tabs to unhide.
    Select tab to unhide in Excel for the web

  4. Click OK.

Hiding and Unhiding worksheets in Excel is a straightforward task.

You can hide a worksheet and the user would not see it when he/she opens the workbook. However, they can easily unhide the worksheet if they want (as we will see later in this tutorial).

But what if you don’t want them to be able to unhide the worksheet(s).

To do that, you need to take a couple of additional steps to make sure the worksheets are ‘very hidden’ (also covered later in this tutorial).

Let’s see how to hide a worksheet in Excel so that it can easily be unhidden, or can not be unhidden.

Regular Way of Hiding a Worksheet in Excel

You can use the below steps to hide a worksheet in Excel:

  • Right-click on the sheet tab that you want to hide.
  • Click on Hide.Hide a worksheet in Excel - right click and select Hide

This would instantly hide the worksheet, and you will not see it in the workbook. This setting remains intact when you save the workbook and reopen it again, or send it to some else.

PRO TIP: To hide multiple sheets at one go, hold the Control key and then select the sheet tabs (that you want to hide) one by one. Once selected, right-click on any one of the selected tabs and click on ‘Hide”. This will hide all the worksheets at one go.

While this method hides the worksheet, it’s extremely easy to unhide these worksheets as well.

Here are the steps to unhide a worksheet in Excel:

This will instantly make the sheet visible in the workbook.

Note that you can only unhide one sheet at a time. To unhide multiple sheets, you need to repeat the above steps to unhide each worksheet. Alternately, you can use a macro code to unhide all the worksheets at one go.

While this method works in most cases, it doesn’t really help if you want to hide the worksheets so that your client or colleague (or anyone with whom you share the workbook) can’t unhide and view these.

All they need to do is right-click on any of the tabs and they will see what all worksheets are hidden (and unhide these easily).

So let’s see how you can really hide a worksheet so that it can not be unhidden (at least not so easily).

Hide a Worksheet So That It Can Not be Unhidden

Here are the steps to hide a worksheet so that it can not be unhidden:

Now you will notice that the sheet is hidden.

When you right-click on any of the tabs, you will not see it in the list of hidden sheets that you can unhide.

Is this method foolproof? – NO!

This method works as a user can not see the hidden sheet in the list of sheets that he/she can unhide.

But this doesn’t mean that the sheet can’t be unhidden.

Unhide a Sheet that has been ‘Very Hidden’

Here are the steps to unhide a sheet that has been ‘Very Hidden’:

This will unhide the worksheet and it will be visible in the workbook.

Hide/Unhide Worksheets Using VBA

If you have a lot of worksheets that you need to hide/unhide, it can take up a lot of your time.

Using a simple VBA code can automate this task for you.

Hide All Worksheets Using VBA

Below is the VBA code that will hide all the worksheets except the current/active worksheet:

'This macro will hide all the worksheet except the active sheet
Sub HideAllExceptActiveSheet()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetHidden
Next ws
End Sub

The above code would hide all the worksheet except the except the active sheet. However, it will hide it so that these can be unhidden easily (note that ws.Visible property is set to xlSheetHidden).

If you want to hide the sheets so that these can not be unhidden, use the below code:

'This macro will hide all the worksheet except the active sheet
Sub HideAllExcetActiveSheet()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetVeryHidden
Next ws
End Sub

The only change we have done here is making the ws.Visible property xlSheetVeryHidden.

Unhide All Worksheets Using VBA

Below is the code that will unhide all the hidden worksheets in the workbook.

'This code will unhide all sheets in the workbook
Sub UnhideAllWoksheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
End Sub

Using this code, we simply go through each worksheet one by one and make the ws.Visible property equal to xlSheetVisible.

Where to put the code?

Below are the steps to place the code in the VB Editor:

Now you can assign the macro to a shape or run it from the Developer tab. You can read more about different ways to run a macro in Excel here.

Note that you don’t need to insert a new module for each code. You can have one single module and have multiple VBA macro codes in it.

You May Also Like the Following Excel Tutorials:

  • Unhide Columns in Excel (A Simple Step-by-step Guide)
  • How to Unhide Sheets in Excel (All In One Go)
  • How to Create and Use an Excel Add-in.
  • Useful Excel Macros for Beginners.
  • How to Lock Cells in Excel.
  • How to Lock Formulas in Excel.
  • Hide Zero Values in Excel
  • How to Delete All Hidden Rows and Columns in Excel
  • How to Hide or Show Formula Bar in Excel?

Did you know that Excel has two levels of hidden worksheets?  Excel has “hidden” worksheets, and, “very hidden” worksheets. This post walks through the differences, and how to hide worksheets at each level.

By default, all new worksheets are visible.  A visible worksheet’s tab appears in the bottom of the Excel window, enabling the user to click the tab in order to navigate to the worksheet.  Easy enough, let’s move on.

Visible Property

In the real world, an object is either visible or it is not.  For example, Harry Potter is typically visible.  However, when he throws on that sweet cloak of invisibility, he is not visible.  His visible status changes to false.  In the real world, the visible status of an object is either true or false, it is either visible or it is not.  In Excel however, the visible property of a worksheet object has three possible values: true, false, or….very hidden.

Hidden

When a worksheet has a visible property value of true, it is visible and can be seen and selected by the user.  When a worksheet has a visible property of false, it is hidden, and can no longer be seen from within the standard Excel user interface.  That is, the sheet’s tab is gone.  The sheet itself however, is not gone, and formulas can still retrieve values stored on a hidden sheet.  It just disappears from the user interface.

It is pretty easy to hide a sheet.  Although, if we are trying to be technical, we should say it this way: it is pretty easy to change a worksheet’s visible property from true to false.

All five worksheets in my workbook are visible in the following screenshot.

Visible Excel Worksheets

To hide a sheet, simply right-click the sheet’s tab and select hide.  You can also hide a sheet using the following ribbon command:

  • Home > Format > Hide & Unhide > Hide Worksheet

You can also hide a sheet using the following keyboard shortcut:

  • Alt+o, h, h

Sheet2 is hidden in my workbook, as shown in the screenshot below:

Hidden Worksheet

To unhide a sheet, simply right-click any sheet’s tab and select Unhide.  This reveals the Unhide dialog box as shown below.

Unhide Sheet Dialog

Pick the hidden sheet and click ok.  You can also unhide a sheet using the following ribbon command:

  • Home > Format > Hide & Unhide > Unhide Worksheet

You can also unhide a sheet using the following keyboard shortcut:

  • Alt+o, h, u

Now, here is where it gets fun, creating very hidden sheets.

Very Hidden

The third property value is very hidden.  The difference between a hidden sheet and a very hidden sheet is simply this: very hidden sheets do not appear in the Unhide dialog box.

Now, before we get to the mechanics of how to set a sheet’s property to very hidden, let me set up a bit of background that will be useful.  First, we need to understand that in Excel, there is a world outside of the typical Excel user interface.  What you see when navigating inside the Excel application window is a subset of everything available in Excel.  A primary example is macros.  Macros are not edited within the standard interface, they are edited within a utility application called the Visual Basic Editor (VBE).  The VBE is a powerful and useful utility, and Excel power users spend quite a bit of time in it.  It is inside the VBE where we change the visible property of a worksheet to very hidden.  Here is how the VBE refers to the Visible property values:

  • True = xlSheetVisible
  • False = xlSheetHidden
  • Very Hidden = xlSheetVeryHidden

You still with me?  Great, let’s get into the VBE now.

Visual Basic Editor

There are a couple of different ways to open the VBE.  You could use either of the following keyboard shortcut:

  • Alt+F11
  • Alt+t, m, v

Or, if you are more of a ribbon person, you could use the following ribbon command:

  • Developer > Visual Basic  [Note: Microsoft does not ship Excel with the Developer ribbon tab visible, so, you’ll need to turn it on.  In Excel 2010/2013: customize the ribbon and check the Developer tab.  In Excel 2007: go into options and check the “Show developer tab in ribbon” checkbox]

At this point, you should have the VBE open, and it should look a little something like the screenshot below.

Excel Visual Basic Editor

In the top left panel is the Project Explorer, where you can use the tree to navigate to any open workbook, and to any sheet.  Double-click the sheet you want to update.

[Note: if you don’t see the Project Explorer, simply select View > Project Explorer]

Then, you’ll be able to view and change the status of the Visible property in the Properties window.

[Note: if you don’t see the Properties window, simply select View > Properties Window]

On the Visible property, use the combo box to change the value to xlSheetVeryHidden, or, to either of the other options.

In the screenshot below, I selected xlSheetVeryHidden from the Visible property combo box:

xlSheetVeryHidden

Once you return to Excel, you’ll notice that the sheet’s tab is not visible.  You’ll also notice that if the workbook contains very hidden sheets, the user won’t have an option to open the Unhide dialog box.  If the workbook contains both hidden and very hidden sheets, then the user can open the Unhide dialog box, however, the very hidden sheets do not appear.  In my workbook, Sheet2 is very hidden, and Sheet3 is hidden, and the Unhide dialog box is shown in the screenshot below.

Unhide Dialog with Very Hidden Sheet

Wow, Sheet2 is very hidden!

If you want to view the sheet again, simply change the property from xlSheetVeryHidden to xlSheetVisible from within the VBE and you’ll be all set.

Now, with great power comes great responsibility, so use this super power with great care!

Unhiding hidden worksheets in Excel was for a long time troublesome, especially if there were many hidden worksheets in your workbook. Fortunately, Microsoft has just released a new feature in Office 365 (now: “Microsoft 365) for unhiding multiple sheets at once. So far, so good. But what, if you want to unhide “very hidden” sheets? Or, what if you work with older Office versions? Here is everything you need to know!

In this first part you learn to unhide “normal” hidden worksheets in Excel. This regards the far majority of hidden worksheets. If you “miss” a worksheet from the list of hidden sheets, it’s possible that it is very hidden. For very hidden sheets, please click here to scroll down.

Unhide worksheets manually

excel, unhide, manually, worksheet, sheet, hide
Unhide worksheets manually by right clicking on any other worksheet.

The first step: Check if there are any hidden worksheets. Therefore, right click on any sheet name. If the “Unhide” option is greyed out, there are no hidden worksheets in your workbook.

If the “Unhide” button in clickable, click on it. Now you’ll see a list with all hidden (not very hidden) worksheets. Click on any worksheet name in that list and click on OK. 

You want to hide a worksheet? It works basically the same way, just click “Hide” instead of “Unhide”. Please refer to this article for more information.

Update 2021: Unhiding multiple sheets at once with built-in methods (Office 365)

It’s finally here: Unhide multiple worksheets at once in Excel. Microsoft has listened to user suggestions and implemented a fast method to unhide several worksheets:

  1. Right-click on any sheet name.
  2. Click on “Unhide…” (again: if this button is greyed-out it means that there are no hidden sheets in your file).
  3. Hold down the Ctrl key on the keyboard and click on the sheet names one by one you want to show.
    Alternatively, hold down the Shift key to select many sheets at once.

Please note: This feature is only available in Office 365 since beginning of 2021. If you work with older versions of Office / Excel, you have to use one of the following methods.

Unhiding multiple worksheets at once with older versions of Excel

unhide, worksheets, sheets, hide, excel, all, complete
Steps for pasting the VBA function to your Excel Workbook

Again, this is primarily revelant for older versions of Excel (not Office 365 since beginning of 2021; if you are on the current Excel version please scroll up). There is another way of unhiding all hidden and very hidden worksheets: Using VBA. As usual, do the following steps:

  1. Go to the developer ribbon in Excel (or just press Alt + F11 on the keyboard and skip the next step number two).
  2. Click on “Visual Basic”.
  3. Add a new module. Therefore, right click on any sheet and then click on “Insert” and “Module”.
  4. Paste the following code.
  5. Press start on the top.

You can follow the steps on the screenshot on the right-hand-side. If you need assistance with adding the VBA module, please refer to this article.

Sub PROFEXUnhideAllWorksheets()
    'Unhide all sheets in workbook.
    
    Dim PROFEXWorksheet As Worksheet
    'A variable for going through all the worksheets
    
    For Each PROFEXWorksheet In ActiveWorkbook.Worksheets
    'Do for each worksheet, no matter if hidden or unhidden
    
        PROFEXWorksheet.Visible = xlSheetVisible
        'Make the current worksheet visible
        
    Next PROFEXWorksheet
    'End of the loop...

End Sub

How to unhide hidden worksheets with a keyboard shortcut?

To speed up unhiding sheets with older versions than the current Office 365 version, you can use keyboard shortcuts. Press the following keys after each other:

Alt –> O –> H –> U –> Enter 

Repeat these steps – this should speed up the process of unhiding. There is one more disadvantage: This method doesn’t work for all “very hidden” worksheets in Excel.

Very hidden worksheets you have to unhide within the VBA editor (see below in part 2). Select the very hidden worksheet and set the visibility to show. Therefore click on “Visible” in the properties window (usually on the left bottom corner) and set it to “xlSheetVisible”.


Do you want to boost your productivity in Excel?

Get the Professor Excel ribbon!

Add more than 120 great features to Excel!


very hidden, hide, worksheets, worksheet, sheet, unhide, vba, excel
How to hide or unhide a “very hidden” worksheet in Excel

Yes, it sounds strange. Maybe programmer humor… But there is the option to set sheets to “very hidden” in Excel. For unhiding “very hidden” worksheets, you have to open the VBA editor.

  1. Click on “Visual Basic” on the left hand side of the Developer ribbon.
  2. You can see a list of all worksheets within the Project Explorer.
  3. Change the status “Visible” to “xlSheetVisible”.

Part 3: Unhide unhiding hidden and very hidden worksheets comfortably

As unhiding worksheets can be very troublesome, we have included a very simple function into Professor Excel Tools: A worksheet manager.

Just click on “Unhide Sheets” on the “Professor Excel” ribbon. If you don’t have it yet: Download the add-in here.

worksheet, manager, professor, excel, tools

Worksheet Manager in the Excel add-in Professor Excel Tools.
  1. Check the summary: How many hidden and very hidden worksheets does your file have?
  2. Conveniently see all worksheets in a list and select them easily. See also the visibility level of “Visible”, “Hidden” or “Very hidden”.
  3. Either select all sheets from the list or click one of the easy select button (for example, select all hidden but not very hidden worksheets).
  4. Action: Decide, what to do with these sheets: Unhide them, hide them or set them to very hidden.

Professor Excel Tools Box

This function is included in our Excel Add-In ‘Professor Excel Tools’

(No sign-up, download starts directly)


Содержание

  1. How to Hide a Worksheet in Excel (that can not be unhidden)
  2. Regular Way of Hiding a Worksheet in Excel
  3. Hide a Worksheet So That It Can Not be Unhidden
  4. Unhide a Sheet that has been ‘Very Hidden’
  5. Hide/Unhide Worksheets Using VBA
  6. Как сделать лист очень скрытым
  7. How to Unhide Sheets in Excel (All In One Go)
  8. Unhiding Sheets Manually
  9. Unhide All Sheets At One Go
  10. Using Immediate Window
  11. By Adding Macro to QAT (with One Click)
  12. Unhide Sheets With Specific Text in the Name
  13. Unhide Selected Sheets (Based on User Selection)
  14. Unhide All or Selected Sheets Using Custom View
  15. Unhiding Sheets that are ‘Very Hidden’

How to Hide a Worksheet in Excel (that can not be unhidden)

Hiding and Unhiding worksheets in Excel is a straightforward task.

You can hide a worksheet and the user would not see it when he/she opens the workbook. However, they can easily unhide the worksheet if they want (as we will see later in this tutorial).

But what if you don’t want them to be able to unhide the worksheet(s).

To do that, you need to take a couple of additional steps to make sure the worksheets are ‘very hidden’ (also covered later in this tutorial).

Let’s see how to hide a worksheet in Excel so that it can easily be unhidden, or can not be unhidden.

This Tutorial Covers:

Regular Way of Hiding a Worksheet in Excel

You can use the below steps to hide a worksheet in Excel:

  • Right-click on the sheet tab that you want to hide.
  • Click on Hide.

This would instantly hide the worksheet, and you will not see it in the workbook. This setting remains intact when you save the workbook and reopen it again, or send it to some else.

PRO TIP: To hide multiple sheets at one go, hold the Control key and then select the sheet tabs (that you want to hide) one by one. Once selected, right-click on any one of the selected tabs and click on ‘Hide”. This will hide all the worksheets at one go.

While this method hides the worksheet, it’s extremely easy to unhide these worksheets as well.

Here are the steps to unhide a worksheet in Excel:

This will instantly make the sheet visible in the workbook.

Note that you can only unhide one sheet at a time. To unhide multiple sheets, you need to repeat the above steps to unhide each worksheet. Alternately, you can use a macro code to unhide all the worksheets at one go.

While this method works in most cases, it doesn’t really help if you want to hide the worksheets so that your client or colleague (or anyone with whom you share the workbook) can’t unhide and view these.

All they need to do is right-click on any of the tabs and they will see what all worksheets are hidden (and unhide these easily).

So let’s see how you can really hide a worksheet so that it can not be unhidden (at least not so easily).

Here are the steps to hide a worksheet so that it can not be unhidden:

Now you will notice that the sheet is hidden.

When you right-click on any of the tabs, you will not see it in the list of hidden sheets that you can unhide.

Is this method foolproof? – NO!

This method works as a user can not see the hidden sheet in the list of sheets that he/she can unhide.

But this doesn’t mean that the sheet can’t be unhidden.

Here are the steps to unhide a sheet that has been ‘Very Hidden’:

This will unhide the worksheet and it will be visible in the workbook.

Hide/Unhide Worksheets Using VBA

If you have a lot of worksheets that you need to hide/unhide, it can take up a lot of your time.

Using a simple VBA code can automate this task for you.

Hide All Worksheets Using VBA

Below is the VBA code that will hide all the worksheets except the current/active worksheet:

The above code would hide all the worksheet except the except the active sheet. However, it will hide it so that these can be unhidden easily (note that ws.Visible property is set to xlSheetHidden).

If you want to hide the sheets so that these can not be unhidden, use the below code:

The only change we have done here is making the ws.Visible property xlSheetVeryHidden.

Unhide All Worksheets Using VBA

Below is the code that will unhide all the hidden worksheets in the workbook.

Using this code, we simply go through each worksheet one by one and make the ws.Visible property equal to xlSheetVisible.

Where to put the code?

Below are the steps to place the code in the VB Editor:

Now you can assign the macro to a shape or run it from the Developer tab. You can read more about different ways to run a macro in Excel here.

Note that you don’t need to insert a new module for each code. You can have one single module and have multiple VBA macro codes in it.

You May Also Like the Following Excel Tutorials:

Источник

Как сделать лист очень скрытым

Иногда возникают ситуации, когда надо скрыть лист со всем его содержимым от посторонних любопытных глаз. Очень часто это делается из контекстного меню листа (для счастливых обладателей 2007 Excel. Подробнее: здесь). Но при использовании данного метода необходимо защитить книгу, иначе отобразить скрытые листы сможет каждый (тем же правым щелчком мыши — Отобразить). А что делать, если книгу не надо защищать? Ведь часто необходимо оставить пользователям возможность работы со структурой книги, например, добавлять листы. Как тогда скрыть лист так, чтобы его нельзя было отобразить? Есть достаточно простой способ через редактор VBA, при этом обладать навыком программирования вообще не нужно. Итак, определились какой лист надо скрыть. Далее:

  1. заходим в редактор VBA( Alt + F11 )
  2. жмем сочетание клавиш Ctrl + R или идем в меню ViewProject Explorer (чтобы отобразить окно объектов проекта VBA)
  3. жмем F4 или через ViewProperties Window (чтобы отобразить окно свойств)
  4. в левой части окна (в Project Explorer) ищем книгу, лист в которой надо скрыть и раскрываем её папку(на скрине это VBA Project (Книга1))
  5. раскрываем папку Microsoft Excel Objects и выделяем там лист с нужным именем
  6. в Окне свойств (Properties Window) находим свойство Visible и назначаем ему значение xlSheetVeryHidden

Чтобы затем отобразить этот лист необходимо свойству Visible задать значение — xlSheetVisible. При этом для отображения листа необходимо будет обязательно зайти в редактор VBA — простым методом отобразить не получится. И книгу защищать не надо. Что нам и было необходимо.
Для большей надежности можно защитить проект VBA, чтобы не было возможности отобразить лист из VBA, не указав пароль. На функционал это не повлияет совершенно.
В том же окне VBA( Alt + F11 ):

  1. ToolsVBAProject Properties -вкладка Protection
  2. для защиты устанавливается галочка «Lock project for viewing«; для разблокировки — снимается
  3. вписывается/удаляется сам пароль в полях Password и Confirm password.

Скрыть только определенные листы активной книги можно следующим кодом:

Sub Hide_Sheets() Dim ws, aSheets aSheets = Array(«Лист1», «Списки», «Лист2») ‘через запятую перечисляем листы для скрытия(обязательно в кавычках) For Each ws In aSheets ActiveWorkbook.Sheets(ws).Visible = xlSheetVeryHidden ‘отобразить – xlSheetVisible; сделать лист просто скрытым — xlSheetHidden Next wsSh End Sub

Как использовать: Для начала надо убедиться, что разрешены макросы и при необходимости включить их: почему не работает макрос. Затем копируем код выше, из Excel переходим в редактор VBA( Alt + F11 ) —InsertModule. Вставляем туда скопированный код. Теперь код можно вызывать нажатием клавиш Alt + F8 -выделяем Hide_SheetsВыполнить (Run) .
Скрыть все листы в активной книге, кроме листа с именем «Видимый», можно следующим кодом:

Sub Hide_All_Sheets() Dim wsSh As Object For Each wsSh In ActiveWorkbook.Sheets If wsSh.Name <> «Видимый» Then wsSh.Visible = xlSheetVeryHidden ‘отобразить – xlSheetVisible; сделать лист просто скрытым — xlSheetHidden Next wsSh End Sub

Скрыть абсолютно все листы не получится — Excel не позволит это сделать, т.к. в книге должен быть видимым хотя бы один лист.

Источник

How to Unhide Sheets in Excel (All In One Go)

Watch Video – How to Unhide All Sheets In Excel

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!

This Tutorial Covers:

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):

  1. Right-click on any of the existing worksheet tab
  2. Click on the Unhide option. This will open the Unhide dialog box that lists all the hidden worksheets
  3. In the Unhide dialog box, click on the worksheet that you to unhide (you can only select one at a time).
  4. Click OK.

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.

You can hide worksheets in bulk, but not unhide in bulk

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.

While there is no-inbuilt functionality to unhide in bulk, you can easily do this with a simple VBA macro code.

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:

  1. Right-click on any of the visible sheets in the workbook
  2. Click on View code. This will open the VB Editor.
  3. Click the View option in the menu and then click on the Immediate window. This will make the Immediate window appear in the VB Editor (if not there already).
  4. In the Immediate window, copy and paste the following line of code: For each Sheet in Thisworkbook.Sheets: Sheet.Visible=True: Next Sheet
  5. Place the cursor at the end of the line
  6. Hit the Enter key

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:

  1. Click on the record macro button (it’s at the bottom left of the Excel workbook application)
  2. In the Record Macro dialog box, change the Store macro in setting to – Personal Macro Workbook.
  3. Click OK. This will start recording the macro
  4. Click on the Stop macro recording icon (at the bottom left of the workbook). This will stop the macro recording
  5. Right-click on any sheet tab and then click on ‘View Code’
  6. In the VB Editor, double-click on the Module object in the Personal.XLSB workbook
  7. Remove any existing code and copy and paste the above code.
  8. Click the Save icon in the toolbar
  9. Close the Vb Editor

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:

  1. Click on the Customize Quick Access Toolbar icon.
  2. Click on More Commands.
  3. In the Excel Options dialog box, click on the ‘Choose Commands from’ drop-down
  4. Click on Macros. This will show you a list of all the macros in the workbook (including the ones in PERSONAL.XLSB)
  5. Select the macro code to unhide sheets
  6. Click on the Add button
  7. Click OK.

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:

  1. Unhide all the worksheets to begin with
  2. Click the View tab
  3. Click on Custom Views
  4. In the Custom Views dialog box, click on Add. This will open the Add view dialog box
  5. Enter any name for this view where all the sheets (or selected sheets) are visible
  6. Click OK.

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:

  1. Click the View tab
  2. Click on Custom Views
  3. In the Custom Views dialog box, select the view that you want to show
  4. Click on Show button

This would instantly unhide sheets and show those that were visible when you created that custom view.

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:

Источник

If there are some hidden worksheets exist in excel and you want delete them as they are not useful, you can unhide all worksheets and remove them one by one. This way is quite annoying and complex. If we can remove all hidden worksheets by only one step or a simple way, it will be much better.

This post will guide you on how to delete or remove hidden worksheets in Excel using two different methods: the VBA code and the Inspect Document feature. Please read the article below, let’s get started.

How to DeleteRemove Hidden Worksheets in Excel 10.png

Table of Contents

  • 1. Video: Delete or Remove Hidden Worksheets
  • 2. How to View Hidden Sheets in Excel
  • 3. Delete/Remove Hidden Worksheets by VBA
  • 4. Delete/Remove Hidden Worksheets by Inspect Document Function
  • 5. Conclusion

The below tutorial video will show demonstrate how to delete or remove hidden worksheets using VBA code or the Inspect Document feature.

2. How to View Hidden Sheets in Excel

Excel allows users to hide and unhide sheets to protect sensitive data or to reduce clutter in a workbook. To view hidden sheets, you can use the following methods:

Using the Excel Ribbon:

Open the workbook and click on the “Home” tab in the ribbon. Click on the “Format” dropdown arrow in the “Cells” group. Then select “Hide & Unhide” and then choose “Unhide Sheet“.

show unhide worksheets 1.png

Select the sheet that you want to unhide from the list and click “OK.”

show unhide worksheets 2.png

Using the Right-Click Context Menu:

Right-click on any sheet tab in the workbook.  And select “Unhide” from the context menu. Select the sheet that you want to unhide from the list and click “OK.”

show unhide worksheets 3.png

3. Delete/Remove Hidden Worksheets by VBA

VBA code can help you to remove all hidden worksheets in one workbook properly. So, this method is very helpful. You can copy below code directly.

Step1: On current visible worksheet, right click on sheet name tab to load Sheet management menu. Select View Code, Microsoft Visual Basic for Applications window pops up.

How to DeleteRemove Hidden Worksheets in Excel 11.png

Or you can enter Microsoft Visual Basic for Applications window via Developer->Visual Basic.

How to DeleteRemove Hidden Worksheets in Excel 11.png

Step2: In Microsoft Visual Basic for Applications window, click Insert->Module.

How to DeleteRemove Hidden Worksheets in Excel 11.png

Step3: Enter below code in Module1, Save the codes, see screenshot below. And then quit Microsoft Visual Basic for Applications.

How to DeleteRemove Hidden Worksheets in Excel 12.png

Sub RemoveAllHiddenSheets()
Dim i As Integer
  Application.DisplayAlerts = False
  For Each sht In ActiveWorkbook.Sheets
      If sht.Visible = xlSheetHidden Then
        sht.Delete
        i = i + 1
      End If
  Next sht
  Application.DisplayAlerts = True
End Sub

Step 4: Before run macro, let’s see if there are unhide worksheets exist in this workbook.

Delete Hidden Worksheets2

Unhide is enabled in menu so there are some hidden worksheets in this workbook.

Step 5: On current sheet, click Developer->Macro, in Macro window, select Macro ‘RemoveAllHiddenSheets’, then click Run.

Delete Hidden Worksheets3

Step 6: Check if the hidden worksheets are removed or not.

Delete Hidden Worksheets4

Unhide is disabled so there is no hidden worksheet now.

Note: If you want to get some message when running macro to delete hidden worksheets, you can add below code into module. Then you can get some message prompts when executing the macro.

How to DeleteRemove Hidden Worksheets in Excel 13.png

Sub RemoveAllHiddenSheets()
Dim i As Integer
  Application.DisplayAlerts = False
  For Each sht In ActiveWorkbook.Sheets
      If sht.Visible = xlSheetHidden Then
        sht.Delete
        i = i + 1
      End If
  Next sht
  Application.DisplayAlerts = True
    If i = 1 Then
    MsgBox "[1] sheet is removed from this workbook."
  Else
    MsgBox "[" & i & "] sheets are removed from this workbook."
  End If
End Sub

Run the above VBA macro this time, verify that below message pops up to indicate that some sheets are removed.

Delete Hidden Worksheets6

4. Delete/Remove Hidden Worksheets by Inspect Document Function

This method is helpful for the users who are not skilled in code editing. And they can follow below steps to remove all hidden worksheets. All operations are conveniently to operate.

Step1: In Excel ribbon, click File->Info->Check for Issues->Inspect Document.

Delete Hidden Worksheets71

Step2: Click Yes on pops up message.

Delete Hidden Worksheets8

Step3: On pops up Document Inspector, click Inspect.

Delete Hidden Worksheets9

Step4: On current Document Inspector window, drag the scrollbar to the end, verify that Hidden Worksheets is listed, click Remove All.

Delete Hidden Worksheets10

Step5: Verify that all hidden worksheets were removed. Then click Close.

Delete Hidden Worksheets11

Step6: Right click on sheet name tab to double check, verify that Unhide is disabled in menu, that means there is no hidden worksheet now.

Delete Hidden Worksheets12

5. Conclusion

Deleting or removing hidden worksheets in Excel can be accomplished through different methods, including using VBA code or the Inspect Document feature. After reading this article, I think that you will be able to remove hidden worksheets with ease and make the most of your Excel files.

See all How-To Articles

This tutorial will demonstrate how to hide and unhide worksheets in Excel and Google Sheets.

hidesheet intro

Hiding a Worksheet

You may wish to hide worksheets that contain sensitive information or calculations you don’t want other users to see or amend.

  1. Select the tab of sheet that needs to be hidden.

hidesheet sheet tab

  1. In the Ribbon, select Home > Cells > Format > Hide & Unhide > Hide Sheet.

hidesheet-ribbon

Alternatively, right-click on the sheet tab to obtain a shortcut menu and click Hide.

hidesheet rightclick

The selected sheet disappears from the sheet tabs.

hidesheet visible tabs

  1. Repeat the process to hide any more sheets that need to be hidden.

hidesheet single sheet visible

Note that one sheet always has to remain visible. If you try to hide the remaining sheet, the following message appears.

hidesheet one sheet visible

Unhiding a Worksheet

  1. To show the worksheets once again on the screen, in the Ribbon, select Home > Cells > Format > Hide & Unhide > Unhide Sheet.

hidesheet ribbon show

Alternatively, right-click on the sheet tab to obtain a shortcut menu and click Unhide.

hidesheet rightclick show

  1. Repeat the process to hide any more sheets that need to be unhidden.

Hiding Worksheets Using VBA Code

If you want to hide multiple sheets at a time, use a loop in VBA code to loop through the sheets and hide each sheet during the loop. You need to put in an error trap, however, as the macro would try to hide all the sheets, and as shown above, you need at least one sheet visible.

Sub HideSheets()
  Dim wks As Worksheet 
  On Error Resume Next
  For Each wks In ActiveWorkbook.Worksheets
  wks.Visible = False
  Next wks
End Sub

Alternatively, if you want to keep a specific sheet visible but hide the rest, test for the name property of the sheet by adding an IF statement to the macro and hide all the sheets except the one you wish to remain visible.

Sub HideSheets()
  Dim wks As Worksheet
  For Each wks In ActiveWorkbook.Worksheets
  If wks.name <> "MainSheet" Then
  wks.Visible = False
  End If
  Next wks
End Sub

Showing a Worksheet Using VBA Code

To unhide more than one worksheet at a time, use a loop in VBA code to loop through the sheets and unhide each sheet during the loop. You don’t need an error trap since the code loops through all sheets and unhides only the ones that are hidden.

Sub ShowSheets
  Dim wks as worksheet
  For each wks in ActiveWorkbook.Worksheets
  wks.Visible = True
  Next wks
End Sub

Hiding a Worksheet in Google Sheets

  1. To hide a worksheet in a Google Sheets file, right-click on the sheet tab to obtain a shortcut menu.

hide sheets hide google sheets

  1. Select Hide sheet.
  2. Repeat this process for each sheet you want to hide.

Unhiding a Worksheet in Google Sheets

  1. To unhide a worksheet in Google Sheets, in the Menu, select View > Hidden sheets. The number in parentheses indicates how many sheets are hidden.

hidesheet unhide google sheets

  1. Select the sheet that needs to be unhidden.
  2. Repeat the process for each sheet that needs to be made visible.

Don’t worry, hidden worksheets are not deleted

Updated on December 31, 2020

What to Know

  • Easiest way to hide a worksheet: right-click the worksheet tab and select Hide.
  • Easiest way to unhide: right-click any worksheet tab, select Unhide, and select worksheet to unhide.
  • Alternatively, on the ribbon, go to Home > Format > Hide & Unhide > Hide Sheet or Unhide Sheet.

This article explains how to hide and unhide worksheets using the contextual menu and the ribbon in Excel for Microsoft 365, Excel 2019, 2016, 2013, and 2010. 

Data Use in Hidden Worksheets

An Excel worksheet is a single spreadsheet that contains cells. Each cell can hold text, a number, or a formula, and each cell can reference a different cell on the same worksheet, the same workbook, or a different workbook.

By default, all open Excel workbooks display worksheet tabs on the taskbar at the bottom of the screen, but you can hide or display them as needed. At least one worksheet must be visible at all times.

Hiding worksheets doesn’t mean you’re deleting them, and you can still reference them in formulas and charts located on other worksheets or other workbooks.

Hide Worksheets Using the Contextual Menu

The options available in the contextual menu — the right-click menu — change depending on what is selected.

If the Hide option is inactive or grayed out, most likely, the current workbook has only one worksheet. Excel deactivates the Hide option for single-sheet workbooks because there must always be at least one visible sheet.

How to Hide a Single Worksheet

  1. Click the worksheet tab to select it.

  2. Right-click on the worksheet tab to open the contextual menu.

  3. In the menu, click the Hide option to hide the selected worksheet.

    How to Hide Multiple Worksheets

  4. Click the tab of the first worksheet to be hidden to select it.

  5. Press and hold down the Ctrl key on the keyboard.

  6. Click the tabs of additional worksheets to select them.

  7. Right-click on one worksheet tab to open the contextual menu.

  8. In the menu, click on the Hide option to hide all the selected worksheets.

Hide Worksheets Using the Ribbon

Excel has no keyboard shortcut for hiding worksheets, but you can use the ribbon bar to accomplish the same task.

  1. Select one or more worksheet tabs at the bottom of an Excel file.

  2. Click the Home tab on the ribbon.

  3. Select Format in the Cells group.

  4. Click on Hide & Unhide.

  5. Select Hide Sheet.

Unhide Worksheets Using the Contextual Menu

You can unhide tabs using the contextual menu, just as you can hide them.

  1. Right-click a worksheet tab to open the Unhide dialog box, which displays all the currently hidden sheets.

  2. Click the sheet you want to unhide.

  3. Click OK to unhide the selected worksheet and to close the dialog box.

Unhide Worksheets Using the Ribbon

As with hiding worksheets, Excel has no keyboard shortcut for unhiding a sheet, but you can still use the ribbon.

  1. Select one or more worksheet tabs at the bottom of the Excel file.

  2. Click the Home tab on the ribbon.

  3. Select Format.

  4. Click Hide & Unhide.

  5. Select Unhide Sheet.

  6. Click the sheet you want to unhide from the list that pops up.

  7. Click OK.

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Like this post? Please share to your friends:
  • High frequency word can
  • Hidden words in word game
  • High and low frequency word
  • Hidden word перевод с английского
  • Hiding worksheets excel vba