It's difficult to know it will work without a sample workbook but we can try.
Right click on the sheet tab for the "Schedule" sheet and select "View Code".
Paste the code below in that module then see if it works when you change cells B2 or C2.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 Then
If Not Intersect(Target, Range("B2:C2")) Is Nothing Then
Select Case Day(Application.EoMonth(Range("A1"), 0))
Case 30
Columns("AF:AG").EntireColumn.Hidden = False
Columns("AH").EntireColumn.Hidden = True
Case 29
Columns("AF").EntireColumn.Hidden = False
Columns("AG:AH").EntireColumn.Hidden = True
Case 28
Columns("AF:AH").EntireColumn.Hidden = True
Case Else
Columns("AF:AH").EntireColumn.Hidden = False
End Select
End If
End If
End Sub
BSB
Bookmarks