T_FREEDAYS

=T_FREEDAYS(y,fwd,add,excl)

y
year
fwd
free weekdays, 1 for Monday, 7 for Sunday, {6,7} for Saturday and Sunday, or any other sequence combination, out of 1-7 values , will not match.
add
array of dates to be added also as free days(holidays), etc. to the regular ones
excl
array of dates to be excluded from the regular ones, (knowing that on a particular Sunday or more we have to work)

T_FREEDAYS optional tool formula for ACALENDAR to easily replace your free days array(holidays) argument (h) for the entire year.

Xlambda

Well-known Member
Joined
Mar 8, 2021
Messages
860
Office Version
  1. 365
Platform
  1. 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
ABCDEFGHIJKLMNOPQR
1formula 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
3year21
4add to the regular free datesfree days can be defined and call as a name using the formula or embeded directly in the ACALENDAR formula
501-01-21=T_FREEDAYS(21,7,A5:A12,A17:A19)
631-12-2101-01-21
704-07-2131-12-21=ACALENDAR(,"mar",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16)
817-03-2104-07-21 Mar2021
908-03-2117-03-21MonTueWedThuFriSatSunother dates
1005-03-2108-03-21010203 ?0405 ⛱0607used in ACALENDAR
1105-07-2105-03-2108 ⛱091011121314 ⛱03-03-21
1228-07-2105-07-21151617 ⛱1819 ?202123-03-21
1328-07-212223 ?2425262728 ⛱31-03-21
1403-01-21293031 ?02-07-21
15exclude from regular10-01-2114-07-21
16free dates17-01-2118-07-21
1707-03-2124-01-21
1821-03-2131-01-21on July will see this calendar
1918-07-2107-02-21=ACALENDAR(,"jul",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16)
2014-02-21 Jul2021
21all free days easier to check21-02-21MonTueWedThuFriSatSun
22=AUNSTACK(E6#,19)28-02-210102 ?0304 ⛱
2301-01-2104-04-2122-08-2114-03-2105 ⛱060708091011 ⛱
2431-12-2111-04-2129-08-2128-03-21121314 ?15161718 ?
2504-07-2118-04-2105-09-2104-04-2119 ?202122232425 ⛱
2617-03-2125-04-2112-09-2111-04-21262728 ⛱293031
2708-03-2102-05-2119-09-2118-04-21
2805-03-2109-05-2126-09-2125-04-21
2905-07-2116-05-2103-10-2102-05-21Obs. Remember!! to leave the ACALENDAR updating itself
3028-07-2123-05-2110-10-2109-05-21 we ignore all the arguments for d,m,y ACALENDAR(,,,h,o)
3103-01-2130-05-2117-10-2116-05-21
3210-01-2106-06-2124-10-2123-05-21
3317-01-2113-06-2131-10-2130-05-21
3424-01-2120-06-2107-11-2106-06-21
3531-01-2127-06-2114-11-2113-06-21
3607-02-2104-07-2121-11-2120-06-21
3714-02-2111-07-2128-11-2127-06-21
3821-02-2125-07-2105-12-2104-07-21
3928-02-2101-08-2112-12-2111-07-21
4014-03-2108-08-2119-12-2125-07-21
4128-03-2115-08-2126-12-2101-08-21cutted here on purpose , for not increasing the size of the minisheet
4208-08-21allvalues are grouped under AUNSTACK formula
ACALENDAR plus
Cell Formulas
RangeFormula
E5,A22,G19,G7E5=FORMULATEXT(E6)
E6:E62E6=T_FREEDAYS(21,7,A5:A12,A17:A19)
G8:M15G8=ACALENDAR(,"mar",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16)
G20:M27G20=ACALENDAR(,"jul",21,T_FREEDAYS(21,7,A5:A12,A17:A19),P11:P16)
A23:C41A23=AUNSTACK(E6#,19)
Dynamic array formulas.
 
Upvote 0
cool icons...
Excel Formula:
LAMBDA 5.0.xlsm
ABCDEFGHIJKLM
1for fun here are other cool ACALENDAR icons, added by holding Win key and pressing . Key.
2???☠⛷??✨⛳????⏰⛵?????⭐??❌⭕?❗‼⁉?☢☣⚠❎✅??⏸⏹⏺☑✔➕➖✖???⚫⚪⬛⬜◼◻◾◽▪▫???????????♥♦?☎???????????⏳✈?⚓??‍????‍☠️??♨???⛱
3
4extracting them separate with use of MID, to get their UNICODE values does not work as expectedcutted
5=MID(A2,SEQUENCE(LEN(A2)),1)
6
7adding "," between each characters and extract them with ASPLIT will do the trick
8?,?,?,☠,⛷,?,?,✨,⛳,?,?,?,?,⏰,⛵,?,?,?,?,?,⭐,?,?,❌,⭕,?,❗,‼,⁉,?,☢,☣,⚠,❎,✅,?,?,⏸,⏹,⏺,☑,✔,➕,➖,✖,?,?,?,⚫,⚪,⬛,⬜,◼,◻,◾,◽,▪,▫,?,?,?,?,?,?,?,?,?,?,?,♥,♦,?,☎,?,?,?,?,?,?,?,?,?,?,?,⏳,✈,?,⚓,?,?‍?,?,?,?‍☠️,?,?,♨,?,?,?,⛱
9
10=ASPLIT(C8,",")ASPLIT
11???????
12
13stack them
14=ASTACK(C11#,10)ASTACK
15??????
16????????
17????
18??
19???
20??
21?????????
22????????
23???????‍?
24???‍☠️?????
25
26
27map UNICODE val to be used inside UNICHAR(), (inside ACALENDAR lambda,after LET (variables td, for day,hy for free days,ot for other dates)
28 easy to edit in name manager =LAMBDA(d,m,y,h,o,LET(td,UNICHAR(128197),hy,UNICHAR(9969),ot,UNICHAR(128681),yx,…......
29=IFERROR(C15#&" - "&UNICODE(C15#),"")
30? - 128197? - 128512? - 128547☠ - 9760⛷ - 9975? - 128077? - 128078✨ - 10024⛳ - 9971? - 128272
31? - 128187? - 128198? - 128467⏰ - 9200⛵ - 9973? - 128674? - 127957? - 127958? - 127965? - 127774
32⭐ - 11088? - 127775? - 128219❌ - 10060⭕ - 11093? - 128683❗ - 10071‼ - 8252⁉ - 8265? - 128261
33☢ - 9762☣ - 9763⚠ - 9888❎ - 10062✅ - 9989? - 128160? - 127379⏸ - 9208⏹ - 9209⏺ - 9210
34☑ - 9745✔ - 10004➕ - 10133➖ - 10134✖ - 10006? - 128280? - 128308? - 128309⚫ - 9899⚪ - 9898
35⬛ - 11035⬜ - 11036◼ - 9724◻ - 9723◾ - 9726◽ - 9725▪ - 9642▫ - 9643? - 128310? - 128312
36? - 128311? - 128313? - 128314? - 128315? - 128306? - 128307? - 128722? - 129351? - 127942♥ - 9829
37♦ - 9830? - 128273☎ - 9742? - 128222? - 128190? - 128269? - 128270? - 128161? - 128176? - 128228
38? - 128229? - 128233? - 128203? - 128206⏳ - 9203✈ - 9992? - 128752⚓ - 9875? - 127937?‍? - 127987
39? - 127987? - 127988?‍☠️ - 127988? - 128681? - 129517♨ - 9832? - 128718? - 129527? - 127777⛱ - 9969
40cutted
ACALENDAR icons
Cell Formulas
RangeFormula
A5,C29,C14,C10A5=FORMULATEXT(A6)
A6:A168A6=MID(A2,SEQUENCE(LEN(A2)),1)
C11:CX11C11=ASPLIT(C8,",")
C15:L24C15=ASTACK(C11#,10)
C30:L39C30=IFERROR(C15#&" - "&UNICODE(C15#),"")
Dynamic array formulas.
 

Forum statistics

Threads
1,223,574
Messages
6,173,146
Members
452,502
Latest member
PQCurious

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top