Xlambda
Well-known Member
- Joined
- Mar 8, 2021
- Messages
- 860
- Office Version
- 365
- Platform
- Windows
T_FREEDAYS optional tool formula for ACALENDAR to easily replace your free days array(holidays) argument (h) for the entire year, if you want to show icons for Sundays, or, Sundays and Saturdays, or Fridays, etc., can be embedded in ACALENDAR. Calls AFLATTEN and APPEND2V (proves that APPEND2V works inside other formulas, handling array calculations)
Excel Formula:
=LAMBDA(y,fwd,add,excl,
LET(fd,EDATE("1-1-"&y,0),
fdwd,WEEKDAY(fd,3),s,SEQUENCE(54,7,fd-fdwd),xw,ISNUMBER(XMATCH(SEQUENCE(,7),fwd)),fs,FILTER(s,xw),
ca,YEAR(fs)=YEAR(fd),cb,NOT(ISNUMBER(XMATCH(fs,excl))),ffs,IF(ca*cb,fs,""),x,AFLATTEN(ffs),xx,FILTER(x,x<>""),
APPEND2V(add,xx,)
)
)
LAMBDA 5.0.xlsm | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | |||
1 | formula to build easy your free days for the whole year,if you want to show for ex. Sundays or, Sundays and Saturdays, Fridays..etc. | |||||||||||||||||||
2 | ||||||||||||||||||||
3 | year | 21 | ||||||||||||||||||
4 | add to the regular free dates | free days can be defined and call as a name using the formula or embeded directly in the ACALENDAR formula | ||||||||||||||||||
5 | 01-01-21 | =T_FREEDAYS(21,7,A5:A12,A17:A19) | ||||||||||||||||||
6 | 31-12-21 | 01-01-21 | ||||||||||||||||||
7 | 04-07-21 | 31-12-21 | =ACALENDAR(,"mar",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16) | |||||||||||||||||
8 | 17-03-21 | 04-07-21 | Mar | 2021 | ||||||||||||||||
9 | 08-03-21 | 17-03-21 | Mon | Tue | Wed | Thu | Fri | Sat | Sun | other dates | ||||||||||
10 | 05-03-21 | 08-03-21 | 01 | 02 | 03 ? | 04 | 05 ⛱ | 06 | 07 | used in ACALENDAR | ||||||||||
11 | 05-07-21 | 05-03-21 | 08 ⛱ | 09 | 10 | 11 | 12 | 13 | 14 ⛱ | 03-03-21 | ||||||||||
12 | 28-07-21 | 05-07-21 | 15 | 16 | 17 ⛱ | 18 | 19 ? | 20 | 21 | 23-03-21 | ||||||||||
13 | 28-07-21 | 22 | 23 ? | 24 | 25 | 26 | 27 | 28 ⛱ | 31-03-21 | |||||||||||
14 | 03-01-21 | 29 | 30 | 31 ? | 02-07-21 | |||||||||||||||
15 | exclude from regular | 10-01-21 | 14-07-21 | |||||||||||||||||
16 | free dates | 17-01-21 | 18-07-21 | |||||||||||||||||
17 | 07-03-21 | 24-01-21 | ||||||||||||||||||
18 | 21-03-21 | 31-01-21 | on July will see this calendar | |||||||||||||||||
19 | 18-07-21 | 07-02-21 | =ACALENDAR(,"jul",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16) | |||||||||||||||||
20 | 14-02-21 | Jul | 2021 | |||||||||||||||||
21 | all free days easier to check | 21-02-21 | Mon | Tue | Wed | Thu | Fri | Sat | Sun | |||||||||||
22 | =AUNSTACK(E6#,19) | 28-02-21 | 01 | 02 ? | 03 | 04 ⛱ | ||||||||||||||
23 | 01-01-21 | 04-04-21 | 22-08-21 | 14-03-21 | 05 ⛱ | 06 | 07 | 08 | 09 | 10 | 11 ⛱ | |||||||||
24 | 31-12-21 | 11-04-21 | 29-08-21 | 28-03-21 | 12 | 13 | 14 ? | 15 | 16 | 17 | 18 ? | |||||||||
25 | 04-07-21 | 18-04-21 | 05-09-21 | 04-04-21 | 19 ? | 20 | 21 | 22 | 23 | 24 | 25 ⛱ | |||||||||
26 | 17-03-21 | 25-04-21 | 12-09-21 | 11-04-21 | 26 | 27 | 28 ⛱ | 29 | 30 | 31 | ||||||||||
27 | 08-03-21 | 02-05-21 | 19-09-21 | 18-04-21 | ||||||||||||||||
28 | 05-03-21 | 09-05-21 | 26-09-21 | 25-04-21 | ||||||||||||||||
29 | 05-07-21 | 16-05-21 | 03-10-21 | 02-05-21 | Obs. Remember!! to leave the ACALENDAR updating itself | |||||||||||||||
30 | 28-07-21 | 23-05-21 | 10-10-21 | 09-05-21 | we ignore all the arguments for d,m,y ACALENDAR(,,,h,o) | |||||||||||||||
31 | 03-01-21 | 30-05-21 | 17-10-21 | 16-05-21 | ||||||||||||||||
32 | 10-01-21 | 06-06-21 | 24-10-21 | 23-05-21 | ||||||||||||||||
33 | 17-01-21 | 13-06-21 | 31-10-21 | 30-05-21 | ||||||||||||||||
34 | 24-01-21 | 20-06-21 | 07-11-21 | 06-06-21 | ||||||||||||||||
35 | 31-01-21 | 27-06-21 | 14-11-21 | 13-06-21 | ||||||||||||||||
36 | 07-02-21 | 04-07-21 | 21-11-21 | 20-06-21 | ||||||||||||||||
37 | 14-02-21 | 11-07-21 | 28-11-21 | 27-06-21 | ||||||||||||||||
38 | 21-02-21 | 25-07-21 | 05-12-21 | 04-07-21 | ||||||||||||||||
39 | 28-02-21 | 01-08-21 | 12-12-21 | 11-07-21 | ||||||||||||||||
40 | 14-03-21 | 08-08-21 | 19-12-21 | 25-07-21 | ||||||||||||||||
41 | 28-03-21 | 15-08-21 | 26-12-21 | 01-08-21 | cutted here on purpose , for not increasing the size of the minisheet | |||||||||||||||
42 | 08-08-21 | allvalues are grouped under AUNSTACK formula | ||||||||||||||||||
ACALENDAR plus |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E5,A22,G19,G7 | E5 | =FORMULATEXT(E6) |
E6:E62 | E6 | =T_FREEDAYS(21,7,A5:A12,A17:A19) |
G8:M15 | G8 | =ACALENDAR(,"mar",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16) |
G20:M27 | G20 | =ACALENDAR(,"jul",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16) |
A23:C41 | A23 | =AUNSTACK(E6#,19) |
Dynamic array formulas. |
Upvote
0