Hi
On the basis that the 'Colour' (or any other string) is always at the begining of the sheet name, then this will delete any name series you care to create.
Note: this will delete sheets without notification. If that is a problem just delete the line
Application.DisplayAlerts = False
from the code
Also it will not delete the last sheet (it will throw an error if you try and delete every sheet).
The UCase() functions make this not case sensitive, again remove these if you want case sensitivity.
Code: ( text )
Sub DeleteSheetColour(ByVal strColour As String)
Dim ws As Worksheet
Dim NLen As Integer
NLen = Len(strColour)
For Each ws In ActiveWorkbook.Sheets
With ws
If Left(UCase(.Name), NLen) = UCase(strColour) Then
If ThisWorkbook.Sheets.Count > 1 Then
Application.DisplayAlerts = False
.Delete
Application.DisplayAlerts = True
End If
End If
End With
Next ws
End Sub
Sub TestSheetDelete()
DeleteSheetColour "Green"
End Sub
HTH
MTB