How to quickly delete multiple sheets in Excel
Working with sheets in Excel involves the very basics of working with Excel tables. With an Excel sheet we have operations like adding sheets, changing sheet colors or deleting sheets when not in use.
The sheet deletion operation basically just press Delete to delete. However, if you need to delete multiple sheets then the traditional way of deleting each sheet is relatively time-consuming and unprofessional. The following article will guide you to read 2 ways to delete multiple sheets in Excel.
1. How to delete multiple Excel sheets by Ctrl
To delete a sheet in Excel , just right-click on the sheet you want to delete and select Delete .
If you want to delete multiple sheets at the same time , we press and hold the Ctrl key, then click the sheets you want to delete, right-click and choose Delete .
Alternatively, you can also right-click a sheet and select Select All Sheets to select all the sheets .
Hold down the Ctrl key and click on the sheets you don't want to delete , and then press Delete to delete the rest.
Instructions for deleting multiple Excel sheets with Macros code
Besides the traditional delete Excel sheet above, we can also use Macros to delete multiple sheets at once.
Step 1:
You do not want to separate the sheet names you want to delete from other sheets. Then press Alt + F11 to launch Microsoft Visual Basic for Applications. Then click Insert> Module .
Step 2:
Next you enter the code below into the interface.
Public Sub Test() Application.DisplayAlerts = False Dim Ws As Worksheet For Each Ws In Worksheets If Ws.Name <> "Test" Then Ws.Delete Next Ws Application.DisplayAlerts = True End Sub
Here Test is the sheet you want to keep in the Excel table.
Step 3:
Continue to click Run to run the code in Excel.
Resulting all sheets in the data file have been deleted, except for the Test sheet that we entered in the code.
Discover more
Share by
Lesley MontoyaYou should read it
- How to print multiple sheets in Excel
- Tricks using Google Sheets should not be ignored
- 5 reasons you should give up Excel and start using Google Sheets
- How to convert Excel file to Google Sheets
- List of common shortcuts for Google Sheets on Chrome OS (Part 3)
- The Quiet Details That Make a Sports Betting Platform Feel Reliable
- Instructions on creating toy set images with ChatGPT AI
- How are AI agents changing the journalism industry?
- How to batch rename files on Windows without software
- Software Tools That Will Improve Productivity For Manufacturing Companies
- Instructions on how to fix blue screen errors on Windows 10