
How To Delete Multiple Sheets In Google Sheets In 2 Seconds
Google Sheets has evolved significantly since its launch in 2006. However, there are still some features that leave users wanting more. One such feature is the ability to delete multiple sheets in Google Sheets at once. Whether it’s to remove duplicates or eliminate unnecessary sheets, the lack of this option can be frustrating. But fear not! In this guide, we will explore several methods to help you delete multiple sheets in Google Sheets quickly.
The Easiest Option: Selecting and Deleting Multiple Sheets
If you only have a few sheet tabs to delete, you can simply select them, right-click, and choose “Delete.” However, if you have a large number of sheets to remove, you need to utilize Google Apps Script.
How to Select Multiple Sheets
To delete multiple sheets using various methods, you must first know how to select multiple sheets. Here’s how:
- Click on the tab of the first sheet you want to select.
- Hold down the
CTRL
button. - Click on the next tab you want to select.
- Right-click on one of the selected tabs.
- Click on “Delete.”
- Click “OK” to confirm.
Move the Sheets You Want to a New Workbook
Another option is to copy the sheets you want to keep to a new workbook and delete the rest. This method may not be elegant, but it gets the job done. Here’s how:
- Right-click on the tab of the sheet you want to keep.
- Go to the “Copy to” option.
- Click on “New spreadsheet.”
These steps will create a new Google Sheets document and copy the selected sheet to it. Once done, you can delete the original Google Sheets document.
Delete All Sheets Except the Specified Sheets
If you want to delete all sheets except specific ones, you can use a macro code. This allows you to keep the sheets you want while deleting the rest. Here’s how:
function DeleteAllSheets() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
for (i = 0; i < sheets.length; i++) {
switch(sheets[i].getSheetName()) {
case "Summary":
case "Data":
break;
default:
ss.deleteSheet(sheets[i]);
}
}
}
The above code checks the name of each worksheet in the Google Sheets document. If the name matches the specified sheets in the code, it skips them. Otherwise, it deletes the sheet. Remember to have a backup copy of the deleted worksheets, as the changes made by the code are irreversible.
Delete a Specific Number of Sheets
To delete a specific number of worksheets, you can use a simple macro code. For example, if you want to delete the first 10 sheets, use the following code:
function DeleteFirstNSheet() {
var spreadsheet = SpreadsheetApp.getActive();
for (i = 0; i < 10; i++) {
spreadsheet.deleteActiveSheet();
}
}
This code deletes the specified number of sheets starting from the leftmost sheet in the workbook.
Using an Add-on
If you prefer not to use code, you can use third-party Google Sheets add-ons to delete multiple sheet tabs. One such add-on is “Bulk Sheet Manager.” Here’s how to install and use it:
- Click on the “Add-ons” option in the menu.
- Click on “Get Add-ons.”
- Search for “Bulk Sheet Manager” in the Google Workspace Market dialog box.
- Install the Bulk Sheet Manager Add-on.
- Once installed, go to the “Add-ons” option.
- Select “Bulk Sheet Manager” and click on “Manage sheets.”
- In the pane that opens, select the sheets you want to delete.
- Click on the “Delete” button.
Besides deleting sheets, this add-on also allows you to protect/unprotect and hide/unhide sheets.
Deleting the Entire File
If you want to delete the entire file, you can do so by going to “File” > “Move to trash.” However, be aware that this action is irreversible, and you won’t be able to access the version history of the file.
Final Thoughts
Deleting multiple sheets in Google Sheets doesn’t have to be a cumbersome task. Use one of the methods we’ve discussed to make the process easier. Whether you choose to copy sheets to a new workbook, utilize Google Apps Script, or use an add-on, you can find a solution that suits your needs. We hope you found this guide helpful. For more tips and tutorials, visit Mr Reviews.