Skip to main content

How to delete hidden worksheets in Excel?

Author: Xiaoyang Last Modified: 2024-07-23

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 you want to delete the hidden worksheet.

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  doc-multiply-calculation-3 Run 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:

doc-delete-hidden-worksheets1

4. Then click Delete. And all of the hidden worksheets have been 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.

Note: To apply this Delete All Hidden Sheets feature, firstly, you should download and install Kutools for Excel.

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

1. Go to the ribbon, and click Kutools > 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:

doc-delete-hidden-sheets6

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

doc-delete-hidden-sheets7

4. Click OK to finish this task.

Click Delete All Hidden Sheets to learn more about this feature.


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

With the Inspect Document function of Excel, you can delete the hidden worksheets quickly and easily.

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

doc-delete-hidden-sheets2

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

doc-delete-hidden-sheets3

3. The hidden worksheets will be inspected, then click the Remove All button to delete the hidden worksheets from the active workbook.

doc-delete-hidden-sheets4


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

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...

Description


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!
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you so much, that was great.
This comment was minimized by the moderator on the site
Thanks for sharing, just what I needed.
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations