How to Delete Sheets in Excel – 5 Examples

Download Practice Workbook


Example 1 – Use the Home Tab

  • Click the sheet you want to delete. Keep it as the active sheet.
  • Go to the Home tab and click Delete.
  • Select Delete Sheet.

Home tab of Excel worksheet

  • Click Delete in the prompt.

Confirmation prompt of deleting sheet in Excel

The Use_Home_Tab worksheet is deleted.


Example 2 – Use the Context Menu in the Sheet Tab

  • Right-click the sheet.
  • Select Delete.

Context menu of right-click on any sheet of Excel

  • Click Delete in the prompt.

Confirmation prompt of deleting sheet in Excel

The Apply_Context_Menu sheet is deleted.


Example 3 – Use the Navigation Pane in theView Tab

  • Click the View tab.
  • Select Navigation.

View tab of Excel ribbon

  • Select Use Navigation Pane.

Navigation pane

  • Click Delete.

Delete sheet using Navigation pane

  • Click Delete in the prompt.

Microsoft Excel confirmation prompt

The worksheet is deleted.

Result of deleting sheet in using navigation pane


Example 4 – Use Keyboard Shortcuts to Delete a Sheet in Excel

4.1 Use a Keyboard Shortcut

  • Select the sheet.
  • Press Alt and hold.
  • Press H + D + S one by one.

Keyboard shortcut to delete sheet in Excel

  • Click Delete in the prompt.

Confirmation prompt of deleting sheet in Excel

The selected worksheet is deleted.

Output of deleting sheet


4.2 Use the Legacy Keyboard Shortcut

  • Select the sheet.
  • Press Alt and hold.
  • Press E and L.

Legacy keyboard shortcut to delete sheet in Excel

  • Click Delete in the prompt.

Confirmation prompt

The worksheet is deleted.

Outcome of deleting sheet using legacy keyboard shortcut


Example 5 – Right-Click and use the Keyboard

  • Right-click the sheet you want to delete.

Using keyboard and mouse to delete sheet

  • Press D.
  • Click Delete in the prompt.

Confirmation prompt

 

Read More: Shortcut to Delete Sheet in Excel


How to Delete Multiple Sheets in Excel?

1. Use the Home Tab

  • Press and hold Shift.
  • Select the sheets one by one.

Deleting multiple adjacent sheet in Excel

  • Click the Home tab >> select Delete.
  • Click Delete Sheet.

 


2. Use the Mouse and the Keyboard

2.1 Press Shift and Right-click to delete Adjacent Sheets

  • Press and hold Shift and select the sheets you want to delete.
  • Right-click.

Using mouse and keyboard to delete adjacent sheets

  • Select Delete or press D.

Deleting multiple adjacent sheets in Excel

The selected sheets will be deleted.


2.2 Press Alt and Right-click to delete Non-Adjacent Sheets

  • Press Alt and hold to select non-adjacent sheets.
  • Select the sheets you want to delete and right-click.
  • Select Delete or press D.

The selected non-adjacent sheets will be deleted.

Read More: How to Delete Multiple Sheets in Excel


Can I Use VBA to Delete Sheets in Excel?

Launch the VBA Editor:

  • Go to the Developer tab. If you don’t have the Developer tab on the Ribbon, enable it in Excel Options.
  • Select Visual Basic.

Visual Basic Option of Developer Tab

  • Enter the VBA code in the code window.

VBA editor window

  • Select Insert and add a new Module.

Inserting new Module in VBA


1. Delete the Active Sheet

Sample_Dataset is the active worksheet.

Deleting sheet using VBA

  • Enter the code in the VBA editor window.
Sub Delete_active_sheet()
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End Sub

VBA code to delete the active sheet in Excel

  • Run the code by pressing F5.

The active sheet is deleted.

Result of deleting active sheet using VBA


2. Delete a Sheet by Name

  • Sales_Data is the active sheet.

Deleting a sheet by name using VBA

  • Copy this code into the VBA editor.
Sub delete_sheet_by_name()
Application.DisplayAlerts = False
Sheets("Sales_Data").Delete
Application.DisplayAlerts = True
End Sub

VBA code to delete sheet by name

  • Run the code.

The Sales_Data sheet is deleted.

Output of using VBA code to delete sheet by name


3. Delete Sheets with a Specific Text in the Sheet Name

The workbook contains 4 Sheets with sales and product details in 2020 and 2021. To delete all sheets containing “2020”:

 dataset to delete sheet in Excel using VBA

  • Copy this code into the VBA editor.
Sub DeleteSheetsWithSpecificText()
    Dim ws As Worksheet
    Dim searchText As String
    Dim wsToDelete As Worksheet
    
    ' Define the text you want to search for in sheet names
    searchText = "2020"
    
    ' Loop through all worksheets in the workbook
    For Each ws In ThisWorkbook.Worksheets
        ' Check if the sheet name contains the specified text
        If InStr(1, ws.Name, searchText, vbTextCompare) > 0 Then
            ' Set the sheet to delete
            Set wsToDelete = ws
            ' Delete the sheet without confirmation
            Application.DisplayAlerts = False
            wsToDelete.Delete
            Application.DisplayAlerts = True
        End If
    Next ws
End Sub

VBA code to Delete sheet with specific text

  • Press F5 to run the code.

The two sheets containing “2020” are deleted.

output of running vba code to delete sheet in Excel


4. Delete All Sheets Except the Active Sheet

  • Copy this code into the VBA editor.
Sub Delete_sheets_except_active_sheet()
Application.DisplayAlerts = False
    For Each ws In Worksheets
        If ws.Name <> ActiveSheet.Name Then
            ws.Delete
        End If
    Next ws
Application.DisplayAlerts = True
End Sub

VBA code to delete all sheets except one

  • Run the code and all sheets will be deleted, except the active sheet.

 


Frequently Asked Questions

1. How do I Delete all data in a sheet?

Answer: Select all cells in the sheet. Click the upper-left corner of the sheet. Right-click the selected cells and choose”Delete“.

2. How to insert a sheet in Excel?

Answer: Click the “+” sign beside the existing sheets.

3. Why can’t I delete a sheet in Excel?

Answer: Possible reasons:

  • The sheet is protected. To unprotect it, go to the “Review” tab >> click “Unprotect Sheet,” >> enter the password if required.
  • If the sheet you want to delete is hidden, unhide it. Right-click any sheet tab, select “Unhide,” >> choose the sheet you want to delete.
  • If there is a macro in your workbook that prevents sheet deletion, you need to modify the code. 
  • The workbook is shared and deletion is restricted. 

Delete Sheet in Excel: Knowledge Hub


<< Go Back to Worksheets | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mahfuza Anika Era
Mahfuza Anika Era

Mahfuza Anika Era graduated from the Bangladesh University of Engineering and Technology in Civil Engineering. She has been with ExcelDemy for almost a year, where he has written nearly 30 articles and reviewed many. She has also worked on the ExcelDemy Forum and solved 50+ user problems. Currently, she is working as a team leader for ExcelDemy. Her role is to guide his team to write reader-friendly content. Her interests are Advanced Excel, Data Analysis, Charts & Dashboards,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo