- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How To Delete All The Blank Worksheets In Excel ?
If you routinely use Excel spreadsheets, you may have run across the problem where your workbook has a number of blank worksheets. These blank sheets not only take up space in your desk, but they also make it difficult to properly browse and manage your data.
In this video, we'll show you step−by−step how to find and remove all of Excel's blank worksheets. This lesson will provide you a quick and easy way to clean up your Excel file, regardless of how big or how many sheets your workbook is. You can streamline your workbook, get rid of pointless sheets, and improve workflow by adhering to the directions provided here. Therefore, let's get going and discover how to quickly remove all those blank worksheets from your Excel files!
Delete All The Blank Worksheets
Here, we will first create a VBA module and then run it to complete our task. So let us see a simple process to learn how you can delete all the blank worksheets in Excel.
Step 1
Consider any Excel workbook that contains multiple worksheets.
First, right−click on any sheet name and select View Code to open a VBA application. Then, click on Insert, select Module, and copy the below code into the textbox as shown in the below image.
Right click > View code > Insert > Module > Copy.
Code
Sub DeleteBlankWorksheets() Dim Ws As Worksheet On Error Resume Next Application.ScreenUpdating = False Application.DisplayAlerts = False For Each Ws In Application.Worksheets If Application.WorksheetFunction.CountA(Ws.UsedRange) = 0 Then Ws.Delete End If Next Application.ScreenUpdating = True Application.DisplayAlerts = True End Sub
Step 2
Then save the sheet as a macro−enabled template and click F5 to complete the task.
Save > F5.
Conclusion
In this tutorial, we have used a simple example to demonstrate how you can delete all the blank worksheets in Excel to highlight a particular set of data.