Hello Excel Masters! I have a monthly schedule table - that is generated month by month from drop down menu by choosing the month. There is 5 columns - A is a merged 60 row cell that is just a date in dd.mm. /dddd/ format, and B,C,D and E are 60 free rows for the actual events.
What im trying to do is when i generate the calendar - to have a macro that Hides 50 rows if the Cell in A is Saturday or Sunday.
So far i have this:
Column 6 is a help column with 1-60 next to each day.
G6 =WEEKDAY($A$9;2)
Seams simple enough... but it doesn't work properly and i don't know what is the problem. I did some testing the macro is getting the right result(G6>5) ... but it jumps directly to the else and does nothing. Help please!
What im trying to do is when i generate the calendar - to have a macro that Hides 50 rows if the Cell in A is Saturday or Sunday.
So far i have this:
HTML:
Sub HideRows()
BeginRow = 9
EndRow = 57
ChkCol = 6
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value < 51 Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
End If
Next RowCnt
End Sub
Column 6 is a help column with 1-60 next to each day.
HTML:
Sub DayCheck()
If G6 > 5 Then
HideRows
Else
MsgBox "NOT OK"
End If
End Sub
G6 =WEEKDAY($A$9;2)
Seams simple enough... but it doesn't work properly and i don't know what is the problem. I did some testing the macro is getting the right result(G6>5) ... but it jumps directly to the else and does nothing. Help please!