Sub Hide_Sheets()
Dim i As Integer
Dim SheetCount As Long
SheetCount=ThisWorkbook.WorkSheets.Count
If Sheets("Sheet1").Cells(1, "A").Value2 = "ALL" Then
For i = 2 To SheetCount
Sheets(i).Visible = xlSheetVisible
Next i
Else
For i = 2 To SheetCount
If Sheets(i).Name = Sheets("Sheet1").Cells(1, "A").Value2 Then
Sheets(i).Visible = xlSheetVisible
Else
Sheets(i).Visible = xlSheetHidden
End If
Next i
End If
End Sub
This will always leave Sheet 1 and whatever other sheet you select from its dropdown in a1 unhidden, and hide the rest when you run the macro. Add it to a button beside your dropdown?
EDIT: My bad, forgot about your "All" request.
Bookmarks