2 Ways to Hide Worksheets in Excel (Not Easily Found)
You can hide worksheets to remove it from view. However, in cases where you want to protect important data by hiding worksheets from others who access your file, below are 2 ways to easily protect your hidden worksheets from being discovered. Let’s explore together with Buffcom.net!
Hide Worksheet using Power Query Property
To hide a worksheet, first right-click on the sheet you want to hide, then select View Code.
Next, in the Power Query interface, select the name of the sheet you want to hide and move to the toolbar and select Properties Window (F4).
This will display the sheet properties table you want to hide, under the Visible section: select 2 – XlSheetVeryHidden.
Now the worksheet has been easily hidden. To unhide the worksheet, right-click on any sheet, select Properties from the toolbar, and select -1 – xlSheetVisible.
Hide Worksheet using Macro in Excel
This is a way to hide multiple sheets at once and keep the selected sheet without anyone noticing except for those who know this trick.
The steps are as follows:
Step 1: Right-click on the sheet you want to keep visible and select View Code.
Step 2: Show the Power Query interface. Here, select the name of the sheet you want to keep visible, right-click, and select Insert => Module.
Step 3: Enter the following code to hide the sheet:
Sub HideSheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetVeryHidden
Next ws
End Sub
Step 4: On the toolbar, click Run to run the code and see the result!
If you want to unhide the hidden sheet, go back to the Power Query interface. Select the Module where you inserted the code to hide the sheet. Enter the following code to unhide Sheets:
Sub UnHideSheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
End Sub
Finally, select Run to see the result!
That’s it! I have shown you 2 ways to hide worksheets that are not easily found. I hope you find this article useful. If you like it, please rate the article below to help Buffcom.net!