How about something like this?
In C2 and C3 you enter year and month, then you get the month displayed bellow so that the days for parent 1 are painted in one color, and the days for parent 2 are painted in another color.
It is set so that Parent 1 gets Wed and Thu, and even weekend (starting to count from 05/01/2024), and Parent 2 gets Mon and Tue, and every odd weekend.
Then you have 2 tables, where you can load the holidays for each parent (a list of all the days in that holiday is required). Holidays take precedence over the normal calendar. Just to exemplify I added some dates for Jan 2024. But you can populated them as you like.
To create this i created two named ranges:
With cell B7 selected (this is important as they have relative references) create range "Parent_1" with this formula:
Excel Formula:
=LET( d, Sheet1!B7, wd, WEEKDAY(d,2), holP1, IFERROR(XMATCH(d,HP_1[P1],0),0), holP2, IFERROR(XMATCH(d,HP_2[P2],0),0), IF(d<>"", ((wd>2)*(wd<5) + (wd>4)*ISEVEN(INT((d-45296)/7)) + holP1)*NOT(holP2), 0) )
Also with cell B7 selected create range "Parent_2" with this formula:
Excel Formula:
=LET( d, Sheet1!B7, wd, WEEKDAY(d,2), holP1, IFERROR(XMATCH(d,HP_1[P1],0),0), holP2, IFERROR(XMATCH(d,HP_2[P2],0),0), IF(d<>"", ((wd<3) + (wd>4)*ISODD(INT((d-45296)/7)) + holP2) * NOT(holP1), 0) )
Then create two conditional formatting rules:
View attachment 105296
Here is also a link to download the working file:
ParentingCalendar.zip
ParentingCalendar - copia.xlsx |
---|
|
---|
| A | B | C | D | E | F | G | H | I | J | K | L | M |
---|
1 | | | | | | | | | | | | | |
---|
2 | | Year | 2024 | | Parent 1 | | | | | | | | |
---|
3 | | Month | 2 | | Parent 2 | | | | | | | | |
---|
4 | | | | | | | | | | | | | |
---|
5 | | | | | February 2024 | | | | | Holidays | | Holidays | |
---|
6 | | Sun | Mon | Tue | Wed | Thu | Fri | Sat | | P1 | | P2 | |
---|
7 | | | | | | 01/02/2024 | 02/02/2024 | 03/02/2024 | | 01/01/2024 | | 21/01/2024 | |
---|
8 | | 04/02/2024 | 05/02/2024 | 06/02/2024 | 07/02/2024 | 08/02/2024 | 09/02/2024 | 10/02/2024 | | 02/01/2024 | | 22/01/2024 | |
---|
9 | | 11/02/2024 | 12/02/2024 | 13/02/2024 | 14/02/2024 | 15/02/2024 | 16/02/2024 | 17/02/2024 | | 03/01/2024 | | 23/01/2024 | |
---|
10 | | 18/02/2024 | 19/02/2024 | 20/02/2024 | 21/02/2024 | 22/02/2024 | 23/02/2024 | 24/02/2024 | | 04/01/2024 | | 24/01/2024 | |
---|
11 | | 25/02/2024 | 26/02/2024 | 27/02/2024 | 28/02/2024 | 29/02/2024 | | | | 05/01/2024 | | 25/01/2024 | |
---|
12 | | | | | | | | | | 06/01/2024 | | 26/01/2024 | |
---|
13 | | | | | | | | | | 07/01/2024 | | 27/01/2024 | |
---|
14 | | | | | | | | | | 08/01/2024 | | 28/01/2024 | |
---|
15 | | | | | | | | | | 09/01/2024 | | 29/01/2024 | |
---|
16 | | | | | | | | | | 10/01/2024 | | 30/01/2024 | |
---|
17 | | | | | | | | | | 11/01/2024 | | 31/01/2024 | |
---|
18 | | | | | | | | | | 12/01/2024 | | | |
---|
19 | | | | | | | | | | 13/01/2024 | | | |
---|
20 | | | | | | | | | | 14/01/2024 | | | |
---|
21 | | | | | | | | | | | | | |
---|
|
---|
So show how they work for the holidays:
ParentingCalendar - copia.xlsx |
---|
|
---|
| A | B | C | D | E | F | G | H | I | J | K | L | M |
---|
1 | | | | | | | | | | | | | |
---|
2 | | Year | 2024 | | Parent 1 | | | | | | | | |
---|
3 | | Month | 1 | | Parent 2 | | | | | | | | |
---|
4 | | | | | | | | | | | | | |
---|
5 | | | | | January 2024 | | | | | Holidays | | Holidays | |
---|
6 | | Sun | Mon | Tue | Wed | Thu | Fri | Sat | | P1 | | P2 | |
---|
7 | | | 01/01/2024 | 02/01/2024 | 03/01/2024 | 04/01/2024 | 05/01/2024 | 06/01/2024 | | 01/01/2024 | | 21/01/2024 | |
---|
8 | | 07/01/2024 | 08/01/2024 | 09/01/2024 | 10/01/2024 | 11/01/2024 | 12/01/2024 | 13/01/2024 | | 02/01/2024 | | 22/01/2024 | |
---|
9 | | 14/01/2024 | 15/01/2024 | 16/01/2024 | 17/01/2024 | 18/01/2024 | 19/01/2024 | 20/01/2024 | | 03/01/2024 | | 23/01/2024 | |
---|
10 | | 21/01/2024 | 22/01/2024 | 23/01/2024 | 24/01/2024 | 25/01/2024 | 26/01/2024 | 27/01/2024 | | 04/01/2024 | | 24/01/2024 | |
---|
11 | | 28/01/2024 | 29/01/2024 | 30/01/2024 | 31/01/2024 | | | | | 05/01/2024 | | 25/01/2024 | |
---|
12 | | | | | | | | | | 06/01/2024 | | 26/01/2024 | |
---|
13 | | | | | | | | | | 07/01/2024 | | 27/01/2024 | |
---|
14 | | | | | | | | | | 08/01/2024 | | 28/01/2024 | |
---|
15 | | | | | | | | | | 09/01/2024 | | 29/01/2024 | |
---|
16 | | | | | | | | | | 10/01/2024 | | 30/01/2024 | |
---|
17 | | | | | | | | | | 11/01/2024 | | 31/01/2024 | |
---|
18 | | | | | | | | | | 12/01/2024 | | | |
---|
19 | | | | | | | | | | 13/01/2024 | | | |
---|
20 | | | | | | | | | | 14/01/2024 | | | |
---|
21 | | | | | | | | | | | | | |
---|
|
---|