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
27 авг 2024