Hi,
ALT+F11 to open VB editor. Double click 'ThisWorkbook' and paste the code below in on the right. Close VB editor.
Click a worksheet month in Q4 to Q15.
Note you must now save your workbook as a macro enabled workbook with a .XLSM extension.
Code:Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub Dim x As Long If Not Intersect(Target, Sh.Range("Q4:Q15")) Is Nothing Then Application.EnableEvents = False Application.ScreenUpdating = False For x = 1 To Worksheets.Count Sheets(x).Visible = True Next For x = 1 To Worksheets.Count If UCase(Left(Sheets(x).Name, 3)) <> UCase(Left(Target.Value, 3)) Then Sheets(x).Visible = False End If Next Range(Target.Address).Select Application.EnableEvents = True Application.ScreenUpdating = True End If End Sub




Reply With Quote
Bookmarks