Skip to main content

How to delete hidden worksheets in Excel?

Author: Xiaoyang Last Modified: 2013-06-09

Perhaps you have a workbook contains many hidden worksheets which aren’t useful, and they take up so many bits, now you want to delete all of the trashy hidden worksheets. How could you quickly delete them?

Delete hidden worksheets with VBA code

Delete hidden worksheets with Inspect Document function

Delete hidden worksheets with Kutools for Excel

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, 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()
Dim a As Integer
a = 1
While a <= worksheets="" count="" span="">
If Not Worksheets(a).Visible Then
a = a + 1
End If
End Sub

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


4. Then click Delete. And all of the hidden worksheets have been deleted.

arrow blue right bubble Delete hidden worksheets with Inspect Document function

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

1. If you are using Excel 2010/2013, you can click File > Info > Check for Issues > Inspect Document, see screenshot:


If you have Excel 2007, you can click Office Button on the top left corner, and then click Prepare > Inspect Document. See screenshot:


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


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


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: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Get it Now

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

1. Go to the ribbon, and click Enterprise > Worksheet Tools > Delete All Hidden Sheets, see screenshot:


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


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


4. Click OK to finish this task.

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

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


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
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations