Do you want to remove a sheet tab from your workbook? This post is going to show you all the ways you can delete a sheet in Google Sheets.
When working in Google Sheets, you will find different scenarios where you need to delete one or more sheets. You may want to remove duplicate sheets or sheets that now have redundant data and calculations
In this post, you will learn how to delete sheets in a Google Sheet. Get a copy of the example workbook used in this post and follow along!
Delete a Sheet with the Right-Click Menu
It is quite a simple and easy process to delete a sheet.
Follow these steps to delete a sheet tab from your Google Sheets workbook.
- Right-click on the sheet you want to delete.
- Select the Delete option from the menu.
After you select Delete, you will get a warning prompt.
- Click on the OK button. This will delete the sheet from your workbook.
š Note: The Delete option will be greyed out when thereās only one sheet. The workbook must always have at least one sheet!
Delete Multiple Sheets at the Same Time
When you want to delete several sheets, you donāt have to do it one at a time. Instead, you can delete more than one sheet at the same time. The process is simple.
Select the sheets you want to delete. You do this by holding down the Ctrl key as you click on the sheets you want to delete.
Each of the sheets you select will appear in white color to indicate they are selected.
Right-click on any of the selected sheets and select the Delete option.
You will again get a prompt informing you that youāre about to delete the selected sheets. Select OK to proceed.
Delete Sheet with Sheets Manager Add-on
You can use the Sheets Manager add-on to manage your sheet tab operations and this includes deleting a sheet.
Add-ons are located in the Google workspace market. Go to the Extensions menu ribbon. Then select Add-ons and click on Get add-ons option.
In the workspace market, search for Sheets Manager by Ablebits and click on the Install button. You will be prompted to grant permission.
After installing, exit the workspace market. Go back to the Extensions menu ribbon and you will find the Sheets Manager add-on in the dropdown. Select Sheets Manager and click on Start to use the add on.
In the Sheets manager dialogue window that opens on the right side of the spreadsheet, select the sheet or sheets you want to delete.
You can do this in two ways.
The first method involves holding down the Ctrl key while selecting the sheets.
The second method involves activating the Selection mode by clicking on the checkmark icon at the top right-hand corner of the dialogue window.
With the Selection mode active, you can easily choose which sheets you want to delete by adding a checkmark.
Use the checkbox at the top left-hand corner of the dialogue window to select all the sheets at once.
Once the sheets are selected, use the Delete icon to delete them.
Before deleting the sheet, you get a notification. Click on the Delete button to continue.
Now that the selected sheets are deleted, you can deactivate the Selection mode by clicking on the checkmark icon again.
The sheets will be removed from your workbook!
Delete Sheets with an Apps Script
There is a way to avoid manually selecting many sheets and deleting them. You can have a custom script that allows you to do a batch delete.
That is a solution that will let you delete all sheets that contain a specific keyword. Hereās how you can do this.
Go to the Extensions menu and click on the Apps script option. This will take you to the apps script editor.
function delSheet() {
var ss = SpreadsheetApp.getActive();
var sheets = ss.getSheets();
var ui = SpreadsheetApp.getUi();
var sheetName = ui.prompt("Enter Sheet Name", "Sheet Name", ui.ButtonSet.OK_CANCEL)
if(sheetName.getSelectedButton() == ui.Button.OK) {
var response = sheetName.getResponseText();
}
for(i = 0; i < sheets.length; i++) {
name = sheets[i].getSheetName();
del = ss.getSheetByName(name);
if(name.includes(response)) {
ss.deleteSheet(del)
}
}
}
function onOpen(e) {
SpreadsheetApp.getUi()
.createMenu("Delete")
.addItem('Delete Sheets', 'delSheet')
.addToUi();
}
When you open the apps script editor from the Extensions menu ribbon, copy and paste the script above.
Make sure you hit the Save button and grant the necessary permissions to use the script.
Go back to your spreadsheet and refresh it.
When this is done, you will find a new menu ribbon called Delete Sheets.
When you click on the Delete option in the custom menu, a prompt will appear for you to enter a sheet name. Then the command proceeds to delete all sheets which contain this keyword you entered in the pop-up.
Conclusions
Having sheets with redundant or irrelevant data will only bulk up your spreadsheet file unnecessarily.
While it might have little to no impact on your workflow, itās good practice to keep only relevant data in your spreadsheet.
Deleting a sheet isnāt a complicated procedure. You can do it using the sheet tab’s right-click menu, using the Sheets Manager add-on, or with an app script.
Do you delete sheet tabs in your workbook often? Do you think these methods will be helpful? Let me know in the comments below!
0 Comments