We use up most of our time working with Excel on the spreadsheet. Operating successfully also necessitates the use of many worksheets within a single spreadsheet in excel. Excel allows us to effortlessly add several worksheets to a workbook. Excel also permits us to easily delete sheets. In this article, we will look at the shortcut to delete sheet in excel.
Download Practice Workbook
You can download the workbook and practice with them.
5 Different Shortcuts to Delete Sheet in Excel
We will see how to delete worksheets fast in Excel in this Excel tutorial. We’d go over several methods for deleting sheets in Excel, including keyboard shortcuts, ribbon choices, VBA, etc.
1. Keyboard Shortcut to Delete Sheet in Excel
There are some keyboard shortcuts to delete sheets in excel. Some shortcuts need the mouse as well.
1.1. Regular Keyboard Shortcut
If we’d rather use the keyboard instead of the mouse, the below keyboard shortcut will remove the active sheet or the selected sheets. These keys must be pressed in order. While it appears to be a significantly longer keyboard shortcut at first, it is equally as quick as the other techniques taught in this lesson once we become used to it. Assume that, Sheet1 is unnecessary. So, let’s remove it.
To delete the sheet, use the keyboard shortcut ALT + H + D + S. We may need to use our two hands to press them together. After that, this window will appear and now Click on the delete button.
So, Sheet1 is now disappeared from our workbook.
1.2. Delete Sheet using a Hybrid Keyboard Shortcut
Suppose, we don’t want Sheet3 in our excel workbook. Now, we will remove Sheet3.
To delete Sheet3, right-click on the worksheet, then press the D key on the keyboard.
We will see that a window will appear. Click on the Delete button.
Sheet3 is removed permanently as shown below.
1.3. Legacy Keyboard Shortcut to Delete Sheet
Excel allows some of the old keyboard shortcuts to work in newer versions for compatibility reasons. Moreover, in many circumstances, the earlier shortcuts are both shorter and more efficient. Fortunately, there is a long-forgotten excel keyboard shortcut for deleting worksheets. Presume that, we will delete Sheet2.
For deleting the sheet, press Alt, E, and finally L. Press those keys one by one. And the confirmation window will show up. Now, click on the delete button.
Sheet2 is now gone from our worksheet.
2. Excel Shortcut to Delete Sheet with the Right-Click Menu
This right-click on the mouse technique is the simplest way to delete a worksheet in excel. Assume, we have a three-sheet worksheet like the one below, and we wish to eliminate Sheet1.
The steps to accomplish so are as follows:
➤ At First, we need to right-click on the sheet we want to remove. We are deleting Sheet1.
➤ Then, we can see a drop-down menu. Now, select the Delete and click on that.
➤ Now, click the Delete button.
➤ Finally, Sheet1 is removed from the workbook.
3. Delete the ActiveSheet Using a Short VBA Code
When eliminating a single sheet or a few worksheets, it’s best to follow the procedures outlined above. While VBA can automate the procedure, it’s most beneficial when the task must be repeated numerous times. So, now we will notice in what way we can remove the functional worksheet using VBA. For this, we have to follow some steps below:
➤ In the beginning, we will open the visual basic editor by right-clicking on the sheet from the sheet bar and then going to View Code.
➤ After that, just write down the VBA Code.
Sub DeleteSheet() ActiveSheet.Delete End Sub
➤ Finally, Run the code or press the keyboard shortcut F5 to run the code.
➤ In the end, a pop-up window will appear. Click the delete button.
➤ This will remove the sheet permanently from the workbook.
4. Shortcut VBA Code to Delete Sheet by Name in Excel
We can use VBA to automate the deletion of a certain worksheet (or several worksheets) based on the sheet name. For example, if we have a worksheet named ‘Excel Sheet Name‘ we can delete it using the following steps:
➤ By the same token as the above methods, go to the Visual Basic editor by right-clicking on the worksheet > Click on View Code.
➤ Next, write down the code here.
Sub DeleteSheetByName() Sheets("Excel Sheet Name").Delete End Sub
➤ In the end, press F5 and run the code.
➤ Now, we can see that the sheet with the name ‘Excel Sheet Name’ has been deleted.
5. Delete All Sheets Except the Active Sheet by Short VBA Code
If we have a workbook with numerous worksheets and want to eliminate everything but the current sheet, VBA is definitely the best way to go. Sheet1 is now the active sheet, so this VBA code will remove all the other sheets from the spreadsheet. We can follow the below steps:
➤ Correspondingly to the earlier methods, go to the View Code by right-clicking on the worksheet.
➤ Then, copy and paste the below VBA code.
Sub Delete_Sheet() Dim s As Sheet Application.DisplayAlerts = False For Each s In Sheets If s.Name <> ActiveSheet.Name Then s.Delete End If Next s Application.DisplayAlerts = True End Sub
➤ The above VBA code would delete all the sheets except the active sheet in the workbook.
Hope this will help you! If you have any questions, suggestions, or feedback please let us know in the comment section. Or you can have a glance at our other articles in the ExcelDemy.com blog!