MistaMista
New Member
- Joined
- May 18, 2021
- Messages
- 14
- Office Version
- 2019
- Platform
- Windows
- MacOS
Hello! I have created a dynamic calendar. The conditional formatting is working (colouring the cells where I have saved dates/events for the selected months), but I struggle finding a formula to return the date and events for the whole month next to it in Cell L+M and N+O.
So if you change to April or June 2023 etc, the events will change accordingly. See my screenshots below.
In sheet 'Holidays' is a list of public holidays saved etc, see last screenshot below.
I have also copied the formula to the bottom of this post for anyone who would want to use it
Any suggestions? Ive been playing with a If, match, Vlookup but I cant for the life of me make it work haha. All input is appreciated.
Sheet: Monthly Calendar
Sheet: Holidays
Formula for dynamic Calendar in D5:
=IF(MONTH(DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1)+SEQUENCE(6,7)-WEEKDAY(DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1),2))=MATCH($B$2,'Month Names'!$A$1:$A$12,0),DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1)+SEQUENCE(6,7)-WEEKDAY(DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1),2),"")
So if you change to April or June 2023 etc, the events will change accordingly. See my screenshots below.
In sheet 'Holidays' is a list of public holidays saved etc, see last screenshot below.
I have also copied the formula to the bottom of this post for anyone who would want to use it
Any suggestions? Ive been playing with a If, match, Vlookup but I cant for the life of me make it work haha. All input is appreciated.
Sheet: Monthly Calendar
Sheet: Holidays
Formula for dynamic Calendar in D5:
=IF(MONTH(DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1)+SEQUENCE(6,7)-WEEKDAY(DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1),2))=MATCH($B$2,'Month Names'!$A$1:$A$12,0),DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1)+SEQUENCE(6,7)-WEEKDAY(DATE($B$1,MATCH($B$2,'Month Names'!$A$1:$A$12,0),1),2),"")