Skip to main content

How to delete hidden worksheets in Excel?

Author: Xiaoyang Last Modified: 2025-04-14

Do you have a workbook cluttered with hidden worksheets that are no longer useful and consume valuable space? Removing these unnecessary sheets can streamline your workbook. This guide will show you how to quickly and effectively delete all the hidden worksheets in Excel, helping you clean up and organize your data.

Delete hidden worksheets with VBA code

Delete hidden worksheets with Kutools for Excel

Delete hidden worksheets with the Inspect Document function


arrow blue right bubble Delete hidden worksheets with VBA code

The following VBA code will delete all hidden worksheets within a workbook.

1. Open the workbook from which you want to delete hidden worksheets.

2. Click "Developer" > "Visual Basic" and a new "Microsoft Visual Basic for Applications window" will be displayed, click "Insert" > "Module", then copy and paste the following code into the Module:

Sub deletehidden()
'Updated by Extendoffice 2024/07/23
Dim a As Integer
a = 1
While a <= worksheets="" count="" span="">
If Not Worksheets(a).Visible Then
Worksheets(a).Delete
Else
a = a + 1
End If
Wend
End Sub

3. Click the Run button button to execute the code, and a warning window will pop out for each hidden worksheet to make sure that you want to delete it. See screenshot:

A screenshot showing a warning message when using VBA to delete hidden worksheets in Excel

4. Then click Delete. All hidden worksheets will now be deleted.


arrow blue right bubble Delete hidden worksheets with Kutools for Excel

If you want to delete the hidden worksheets quickly, you can use Kutools for Excel.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After installing Kutools for Excel, you can do as follows:

1. Go to the ribbon, and click "Kutools Plus" > "Worksheet" > "Delete All Hidden Sheets", see screenshot:

2. Then a prompt box pops out to remind you if you want to delete all hidden worksheets. See screenshot:

A screenshot of the prompt to confirm deleting hidden worksheets with Kutools for Excel

3. Click Yes, and another prompt box will appear to remind you how many hidden worksheets have been deleted. See screenshot:

A screenshot showing the number of hidden worksheets deleted using Kutools

4. Click OK to finish this task.


arrow blue right bubble Delete hidden worksheets with the Inspect Document function

You can use Excel's Inspect Document function to quickly and easily delete hidden worksheets.

1. Click "File" > "Info" > "Check for Issues" > "Inspect Document", see screenshot:

A screenshot of the Inspect Document function in Excel

2. In the "Document Inspector" dialog box, click "Inspect" button.

A screenshot of the Document Inspector dialog box in Excel

3. The hidden worksheets will be identified during the inspection. Click the "Remove All" button to delete them from the active workbook.

A screenshot showing the Remove All button in the Document Inspector for deleting hidden worksheets


Related article:

Delete all hidden rows or columns

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


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!