Button "Mark Holidays" given in the sheet. Holidays are marked in the cell.
When the month is changed holidays are not removed. Change the code in those macros to erase the holidays when month is changed.
Code:
Sub Mark_holiidays()
Dim Cel As Range, Frng As Range
Dim K&, D&
Application.EnableEvents = False
For Each Cel In Sheets("Admin & Settings").Range("Q5:Q14")
K = Month(Cel): D = Day(Cel)
With Sheets("Schedule")
If K = .Range("B5") Then
Set Frng = .Range("G4:M34").Find(What:=D, LookIn:=xlValues, LookAt:=xlWhole)
If Not Frng Is Nothing Then Frng.Offset(1, 0) = Cel.Offset(0, -1)
ElseIf K > .Range("B5") Then
Exit For
End If
End With
Next Cel
Application.EnableEvents = True
End Sub
Bookmarks