Hello, I am wanting a macro to automatically run when a spreadsheet is opened to check a cell to see what month it is then hide some rows off the back of that.
It should look something like the below saying if C5 is one of those months then hide rows 12-18 in the sheet Check List.
Any help appreciated.
It should look something like the below saying if C5 is one of those months then hide rows 12-18 in the sheet Check List.
Code:
Private Sub MonthTasks()
For a = 12 To 18
Select Case Range("C5").Value
Case "August", _
"December", _
"February", _
"June", _
"March", _
"May", _
"November", _
"September"
Then
Worksheets("Check List").Rows(a).Hidden = True
End Sub
Any help appreciated.