Delete Multiple Sheets Quickly Using Excel VBA

Опубликовано: 18 Июнь 2026
на канале: Noah Stelting
4,566
15

If you have a Excel file with lots of sheets, here is a quick script to delete multiple sheets at a time using Excel VBA.

Sub deleteSheets()
Dim ws As Worksheet

Application.DisplayAlerts = False

For Each ws In Worksheets
If (InStr(ws.Name, "2022") = 0) Then
ws.Delete
End If
Next ws

Application.DisplayAlerts = True
End Sub