Delete Multiple Excel Worksheets | Excel, VBA - Exceldome

Skip to content Exceldome Delete multiple Excel worksheets

How to delete multiple Excel worksheets using Excel, VBA and Shortcut methods

EXCELVBASHORTCUTEXPLANATION

METHOD 1. Delete multiple Excel worksheets using the sheet option

EXCEL Select multiple worksheets > Right-click on one of the selected worksheets > Delete

1. Press and hold the Shift key and select the worksheets that you want to delete. Note: in this example we are deleting three worksheets and therefore have selected three sheets. Select multiple sheets - Excel
2. Right-click on any of the selected worksheets. 3. Click Delete. Right-click on one of the selected worksheets and select Delete - Excel

METHOD 2. Delete multiple Excel worksheets using the ribbon option

EXCEL Select multiple worksheets > Home tab > Cells group >  Delete > Delete Sheet

1. Press and hold the Shift key and select the worksheets that you want to delete. Note: in this example we are deleting three worksheets and therefore have selected three sheets. Select multiple sheets - Excel
2. Select the Home tab. Select Home tab - Excel
3. Click Delete in the Cells group. 4. Click Delete Sheet. Click Delete and click Delete Sheet - Excel

METHOD 1. Delete multiple Excel worksheets using VBA

VBA Sub Delete_Multiple_Excel_Worksheets() 'declare variables Dim ws1 As Worksheet Dim ws2 As Worksheet Dim ws3 As Worksheet Set ws1 = Worksheets("Sheet1") Set ws2 = Worksheets("Sheet2") Set ws3 = Worksheets("Sheet3") 'delete three worksheets at the same time ws1.Delete ws2.Delete ws3.Delete

End Sub OBJECTS Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets. PREREQUISITES Minimum Number of Worksheets: Have at least four worksheets in a workbook. Worksheet Names: Have three worksheets named Sheet1, Sheet2 and Sheet3.

ADJUSTABLE PARAMETERS Worksheets to Delete: Select worksheets that you want to delete by changing the Sheet1, Sheet2 and Sheet3 worksheet names in the VBA code to any worksheet in the workbook.

METHOD 2. Delete multiple Excel worksheets from a list of names that you want to delete using VBA

VBA Sub Delete_Multiple_Excel_Worksheets() Set ws1 = Worksheets("Parameters").Range("D2") Set ws2 = Worksheets("Parameters").Range("D3") Set ws3 = Worksheets("Parameters").Range("D4") 'delete three worksheets at the same time Worksheets(ws1.Value).Delete Worksheets(ws2.Value).Delete Worksheets(ws3.Value).Delete

End Sub OBJECTS Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets. Range: The Range object is a representation of a single cell or a range of cells in a worksheet. PREREQUISITES Minimum Number of Worksheets: Have at least four worksheets in a workbook, including the Parameters worksheet. Worksheet Names: Have four worksheets named Parameters, Sheet1, Sheet2 and Sheet3. Worksheets to Delete: Cells ("D2"), ("D3") and ("D4") in the Parameters worksheet need to be populated with the names of the worksheets that you want to delete.

ADJUSTABLE PARAMETERS Worksheets to Delete: Select worksheets that you want to delete by changing the worksheet names in cells ("D2"), ("D3") and ("D4") in the Parameters worksheet.

METHOD 3. Delete multiple Excel worksheets from a list of names that you want to delete with a For Loop using VBA

VBA Sub Delete_Multiple_Excel_Worksheets() On Error Resume Next For Each deletews In ThisWorkbook.Worksheets("Parameters").Range("D2:D4") ThisWorkbook.Worksheets(deletews.Value).Delete Next

End Sub OBJECTS Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets. Range: The Range object is a representation of a single cell or a range of cells in a worksheet. PREREQUISITES Minimum Number of Worksheets: Have at least four worksheets in a workbook, including the Parameters worksheet. Worksheet Names: Have four worksheets named Parameters, Sheet1, Sheet2 and Sheet3. Worksheets to Delete: Cell ("D2"), ("D3") and ("D4") in the Parameters worksheet need to be populated with the names of the worksheets that you want to delete.

ADJUSTABLE PARAMETERS Worksheets to Delete: Select worksheets that you want to delete by changing the worksheet names in cells ("D2"), ("D3") and ("D4") in the Parameters worksheet.

METHOD 4. Delete multiple Excel worksheets from a list of names that you want to delete with a For Loop using VBA

VBA Sub Delete_Multiple_Excel_Worksheets() 'declare a variable Dim ws As Worksheet Set ws = Worksheets("Parameters") For x = 2 To 4 On Error Resume Next deletews = ws.Cells(x, 4).Value Worksheets(deletews).Delete Next

End Sub OBJECTS Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets. PREREQUISITES Minimum Number of Worksheets: Have at least four worksheets in a workbook, including the Parameters worksheet. Worksheet Names: Have four worksheets named Parameters, Sheet1, Sheet2 and Sheet3. Worksheets to Delete: Cell ("D2"), ("D3") and ("D4") in the Parameters worksheet need to be populated with the names of the worksheets that you want to delete.

ADJUSTABLE PARAMETERS Worksheets to Delete: Select worksheets that you want to delete by changing the names in cells ("D2"), ("D3") and ("D4") in the Parameters worksheet.

Delete multiple worksheets using a Shortcut

SHORTCUT WINDOWS SHORTCUT

Alt H > D > S

NOTES Select the worksheets that you want to delete, then action the shortcut. The shortcut will delete all of the selected worksheets.

Explanation about how to delete multiple worksheets

EXPLANATION EXPLANATION This tutorial explains and provides step by step instructions on how to delete multiple worksheets using Excel, VBA and Shortcut methods.

Excel Methods: Using Excel you can delete multiple worksheet with a ribbon or sheet option.

VBA Methods: Using VBA you can delete multiple worksheets by directly entering the names of the worksheets that you want to delete or by referencing to cells that capture the names of the worksheets that you want to delete.

Shortcut Method: Using a Shortcut you can delete multiple selected worksheets.

Tag » How To Delete Sheet In Excel