AXMAS

=AXMAS(ht,sh,or)

ht
tree's height (nr. of cells)
sh
step or stair's height
or
ornaments array

Happy Holidays everyone!! For the ones who celebrate Xmas, 2 Xmas tree designs.

Xlambda

Well-known Member
Joined
Mar 8, 2021
Messages
860
Office Version
  1. 365
Platform
  1. Windows
AXMAS , AX two Xmas's trees design.
AX is a "tree" that is already decorated, does not call any other lambda. The ornaments are embedded in the function.
AXMAS is an undecorated one. We can choose our own ornaments array "or". Call AFLAT.
AFLAT , flattens the ornament array, and gives us the versatility to deal with arrays of any shape, size, dimensions, with blanks/null strings, ranges, or other array formulas.
Both designs, randomly, change the display of ornaments every time spreadsheet recalculates, or if we hit F9.
Both lambdas share same concept design, creating a Xmas tree shape, a "triangular" array that can be filled with random values.
A triangular array is like designing a symmetric staircase, it has stairs or steps, and has 2 input parameters "ht", the approximate total height, and "sh", each stair height. Each stair width or depth is by default 1. Knowing these parameters, the function knows how to calculate nr. of steps, exact total height to accommodate nr. of steps and total width footprint of the "staircase".
Both lambdas share same ornament topper (2 parts), and same tree base, (last row) where presents boxes are placed. First variables after LET.
AXMAS(ht,sh,or)
Excel Formula:
=LAMBDA(ht,sh,or,
     LET(t,UNICHAR(11088),i,UNICHAR(9618),p,UNICHAR(127873),
        o,AFLAT(or),n,ROWS(o),h,MAX(9,ht),s,MAX(3,sh),ns,ROUNDUP(h/s,0),y,ns*s+1,x,2*ns-1,r,SEQUENCE(y),c,ABS(SEQUENCE(,x)-ns),
        a,QUOTIENT(r-1,s)>=c,b,INDEX(o,RANDARRAY(y,x,1,n,1)*a),w,SWITCH(r,1,t,2,i,y,IF(c<ns-2,p,""),b),
       IF(a,w,"")
    )
)
AX(ht,sh)
Excel Formula:
=LAMBDA(ht,sh,
    LET(t,UNICHAR(11088),i,UNICHAR(9618),p,UNICHAR(127873),q,SEQUENCE(44,,10035),o,UNICHAR(IF(q>10058,q+117698,q)),
        n,44,h,MAX(9,ht),s,MAX(3,sh),ns,ROUNDUP(h/s,0),y,ns*s+1,x,2*ns-1,r,SEQUENCE(y),c,ABS(SEQUENCE(,x)-ns),
        a,QUOTIENT(r-1,s)>=c,b,INDEX(o,RANDARRAY(y,x,1,n,1)*a),w,SWITCH(r,1,t,2,i,y,IF(c<ns-2,p,""),b),
        IF(a,w,"")
    )
)
AXMAS.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARAS
1AXMAS(ht,sh,or)ornaments array sample
2ht: approx.. height; if ht ignored or <9 => ht=9, (min tree height=9)??
3sh: each "step" height; if ignored or <3 =>sh=3 (3 min."stair" height=3 )smallest treeht,15,sh,4
4or: ornaments array, any array, any shape, any valuesht,,sh,,(ignored)=AXMAS(15,4,X2:AH2)
5Increasing sh value makes triangle's top angle smaller, (higher tree "slope")=AXMAS(,,X2:AH2) 
6For better visual experience, change the grids width to tiny squares, all centered aligned. 
7Predetermined ornaments, topper, 2 parts, tree base,present boxes.
8If you want to change them, just after LET, variables t,i,p?
9
1011088topper 1????
119618topper 2
12127873?base?
13
14Ornaments array values used by these trees in next post.?
15Note: Ornaments shape, color, can look different on your spreadsheet.??
16?
17ht,30,sh,4?
18=AXMAS(30,4,BH17:CU20)?
19 ht,20,sh,, ?
20=AXMAS(20,,BH17:CU20)
21 ???
22?
23????
24?????ornaments array as numbers
25????=AXMAS(13,4,SEQUENCE(9))
26?????? 
27?????????
28?????????5
29?????????3
30????????641
31??????????652
32??????????397
33?????????????254
34???????????46944
35?????????????53637
36?????????????53239
37???????????????28228
38????????????????2773484
39????????????????1397695
40????????????????????6196182
41???????????6214983
42???????????????????????
43???????????
44?????????Note: This values can be used with CF
45???????????
46???????????
47??????????????
48????????????
49???????????
50????????????
51???????????
52
AXMAS 1
Cell Formulas
RangeFormula
AG4,AI25,T20,B18,Y5AG4=FORMULATEXT(AG5)
AG5:AM21AG5=AXMAS(15,4,X2:AH2)
Y6:AC15Y6=AXMAS(,,X2:AH2)
B10:B12B10=UNICHAR(A10:A12)
B19:P51B19=AXMAS(30,4,BH17:CU20)
T21:AF42T21=AXMAS(20,,BH17:CU20)
AI26:AO42AI26=AXMAS(13,4,SEQUENCE(9))
Dynamic array formulas.
 
Upvote 0
Simulating Slot machine, mechanical, with Form Controls.
To be able to see the form controls, also inserted a screen capture.
AXMAS.xlsx
ABCDEFGHIJKLMNOPQR
1
2
3Simulating Slot machine, mechanical, with Form Controls. (can be done with 3 or 5 reels)
4
5=IF(AND(NOT(N11),N10=1),INDEX($D$7#,,1),I9#)
6reel array=ASLOT(B7:B19,,3)=IF(AND(NOT(O11),N10=1),INDEX($D$7#,,2),J9#)
7????=IF(AND(NOT(P11),N10=1),INDEX($D$7#,,3),K9#)
8??BAR?
9???????cell link option buttons form control
10????1
11????TRUETRUEFALSE
12?cell links check box form control
13?
14?block reel from spinningslot machine lever
15?
16?
17?
18?
19BAR
20
ASLOT 3
Cell Formulas
RangeFormula
I5I5=FORMULATEXT(I9)
D6D6=FORMULATEXT(D7)
J6J6=FORMULATEXT(J9)
D7:F9D7=ASLOT(B7:B19,,3)
K7K7=FORMULATEXT(K9)
I9:I11I9=IF(AND(NOT(N11),N10=1),INDEX($D$7#,,1),I9#)
J9:J11J9=IF(AND(NOT(O11),N10=1),INDEX($D$7#,,2),J9#)
K9:K11K9=IF(AND(NOT(P11),N10=1),INDEX($D$7#,,3),K9#)
Dynamic array formulas.

slot machine.png
 
Digital or virtual slot machine with a deck of cards. Poker slot machine. Mechanical vs digital.
AXMAS.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1Slot machine (mechanical or digitalized) with a deck of cards. Can we simulate dealing poker hands?
2reel, deck of cards in order
3=ADECK(1)- using ASLOT (mechanical)
42♠As we see does not make a lot of sense when the cards are in order.
52♣Vertically order is kept whatever we use as reels, ADECK(1) or ADECK(), horizontally, 2 or more reels can be aligned,
62♥meaning there will be lines with dups, fact that is not acurate with simulating dealing hands in a poker game
72♦
83♠all reels unfoldedcheking for dups "byrow" , if values <5 we have dups
93♣=ASLOT(ADECK(1),5)=BYROW(C10#,LAMBDA(a,COUNTA(UNIQUE(a,1))))
103♥Q♦Q♠7♠6♥7♠4
113♦K♠Q♣7♣6♦7♣4- using ANDECK (digital, no mechanical reels possible)
124♠K♣Q♥7♥7♠7♥4The only way to simulate poker hands slot machine is to
134♣K♥Q♦7♦7♣7♦4digitalize it with ANDECK using a single deck of cards, to be sure
144♥K♦K♠8♠7♥8♠4will not have dups
154♦2♠K♣8♣7♦8♣4
165♠2♣K♥8♥8♠8♥4all rounds for single deckdigital poker slot machine with a 3x5 "window"
175♣2♥K♦8♦8♣8♦4=ANDECK(1,5)=INDEX(K18#,SEQUENCE(3),SEQUENCE(,5))
185♥2♦2♠9♠8♥9♠46♥7♣3♣A♦10♥6♥7♣3♣A♦10♥
195♦3♠2♣9♣8♦9♣47♠9♠5♠2♠3♠7♠9♠5♠2♠3♠
206♠3♣2♥9♥9♠9♥42♥2♣K♦5♣J♦2♥2♣K♦5♣J♦
216♣3♥2♦9♦9♣9♦46♦K♠8♠8♥10♠
226♥3♦3♠10♠9♥10♠49♦10♦6♣J♠Q♥or
236♦4♠3♣10♣9♦10♣4Q♠9♥A♥7♦Q♣
247♠4♣3♥10♥10♠10♥4K♥6♠J♥9♣4♠=ANDECK(1,5,3)
257♣4♥3♦10♦10♣10♦47♥8♦5♦8♣A♠8♠7♠10♥K♠8♣
267♥4♦4♠A♠10♥A♠44♦10♣K♣3♥A♣8♦4♥3♣A♥3♦
277♦5♠4♣A♣10♦A♣44♣Q♦5♥3♦2♦6♥5♠Q♥4♦4♣
288♠5♣4♥A♥A♠A♥44♥J♣
298♣5♥4♦A♦A♣A♦4hit F9 to "spin"
308♥5♦5♠J♠A♥J♠4
318♦6♠5♣J♣A♦J♣4
329♠6♣5♥J♥J♠J♥4
339♣6♥5♦J♦J♣J♦4
349♥6♦6♠Q♠J♥Q♠4
359♦7♠6♣Q♣J♦Q♣4
3610♠7♣6♥Q♥Q♠Q♥4
3710♣7♥6♦Q♦Q♣Q♦4
3810♥7♦7♠K♠Q♥K♠4
3910♦8♠7♣K♣Q♦K♣4
40A♠8♣7♥K♥K♠K♥4
41A♣8♥7♦K♦K♣K♦4
42A♥8♦8♠2♠K♥2♠4
43A♦9♠8♣2♣K♦2♣4
44J♠9♣8♥2♥2♠2♥4
45J♣9♥8♦2♦2♣2♦4
46J♥9♦9♠3♠2♥3♠4
47J♦10♠9♣3♣2♦3♣4
48Q♠10♣9♥3♥3♠3♥4
49Q♣10♥9♦3♦3♣3♦4
50Q♥10♦10♠4♠3♥4♠4
51Q♦A♠10♣4♣3♦4♣4
52K♠A♣10♥4♥4♠4♥4
53K♣A♥10♦4♦4♣4♦4
54K♥A♦A♠5♠4♥5♠4
55K♦J♠A♣5♣4♦5♣4
56J♣A♥5♥5♠5♥4
57J♥A♦5♦5♣5♦4
58J♦J♠6♠5♥6♠4
59Q♠J♣6♣5♦6♣4
60Q♣J♥6♥6♠6♥4
61Q♥J♦6♦6♣6♦4
62
ASLOT 4
Cell Formulas
RangeFormula
A3,Q24,Q17,K17,I9,C9A3=FORMULATEXT(A4)
A4:A55A4=ADECK(1)
C10:G61C10=ASLOT(ADECK(1),5)
I10:I61I10=BYROW(C10#,LAMBDA(a,COUNTA(UNIQUE(a,1))))
K18:O28K18=ANDECK(1,5)
Q18:U20Q18=INDEX(K18#,SEQUENCE(3),SEQUENCE(,5))
Q25:U27Q25=ANDECK(1,5,3)
Dynamic array formulas.
 
Simulating a poker digital slot machine makes sense to also cover poker hands rankings (PHR).
PHR: straight flush (royal flush when 10-A same suit), 4 of a kind, full house, flush, straight, 3 of a kind, 2 pairs, 1 pair, high card (I will consider it as "nothing"). See attached picture.
Came out with PHR, Poker Hand Rankings function.
PHR(a,[t]): arguments and functionality:
a: array of n rows x 5 clms, each row representing an accurate poker hand (no dups)
[t]: type argument
- t, 0 or omitted, total occurrences of each rank for whole array of hands "a" => result array 10x1 array (10 ranks)
- t,1 rank of each row (hand, round) => result array rows(a)x1
- t,2 => array result 10x2, 1st clm rank names, 2nd clm ranking occurrences of "a"
- t,3 ranking names only => 10x1

Only one thing about the concept, main trick for checking all possibilities was using the arguments functionality of UNIQUE function "by_col" and "exactly_once".
Excel Formula:
=LAMBDA(a,[t],
    LET(k,{"rf";"sf";"4k";"fh";"f";"s";"3k";"2p";"1p";"n"},IF(t=3,k,
       LET(b,BYROW(a,LAMBDA(r,LET(f,COUNTA(UNIQUE(RIGHT(r,1),1))=1,k,LEFT(r,LEN(r)-1),v,SWITCH(k,"A",14,"K",13,"Q",12,"J",11,--k),
         x,MAX(v)=14,q,SORT(v-MIN(v)+1,,,1),s,AND(q=SEQUENCE(,5)),u,COUNT(UNIQUE(q,1)),o,UNIQUE(q,1,1),n,IF(AND(ISERR(o)),0,COUNT(o)),
         SWITCH(n,0,"fh",3,"1p",2,"3k",1,IF(u=2,"4k","2p"),5,IF(s,IF(f,IF(x,"rf","sf"),"s"),IF(f,"f","n")))))),p,MAP(k,LAMBDA(a,SUM(--(a=b)))),
      SWITCH(t,0,p,1,b,2,IF({1,0},k,p))))
   )
)
AXMAS.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAAB
1Poker Hand Ranking, PHR functiont,1t,omittedt,2
2sampleranking/handt,3 ranking namesall ranking ocurrences in "a"array ranking names and their occurrence in "a"
3rankingnameexamplesa=PHR(J4:N22,1)=PHR(D4:H13,3)=PHR(J4:N22)=PHR(J4:N22,2)
4royal flushrf10♣J♣Q♣K♣A♣10♣A♣J♣Q♣K♣rfrf1rf1
5straight flushsf2♥3♥4♥5♥6♥5♥6♥7♥8♥9♥sfsf2sf2
64 of a kind4k9♠9♥9♣9♦Q♥2♠3♠4♠5♠6♠sf4k24k2
7full housefhA♠A♥A♦J♠J♦K♠K♣K♥K♦8♣4kfh2fh2
8flushf2♠4♠5♠6♠7♠10♣9♥10♠10♥10♦4kf2f2
9straights4♦5♣6♦7♣8♥J♣7♣7♦7♥J♥fhs2s2
103 of a kind3k10♠10♥10♦3♣2♦5♥A♥3♥Q♥9♥f3k23k2
112 pair2pK♠K♥Q♠Q♦3♠4♣10♣Q♣7♣J♣f2p22p2
121 pair1p8♦8♠6♣3♦J♥7♠8♥9♦10♠J♦s1p21p2
13nothingnK♦8♣4♣5♦7♥6♠8♠7♥10♣9♦sn2n2
14K♠3♦K♣3♥K♥fh
15Q♦8♦5♣Q♥Q♠3k
1610♥10♣2♦A♣10♦3k
17A♥6♦J♠A♦J♣2p
18To simulate dealing a shuffled2♣Q♣Q♥10♠2♥2p
19deck of cards, 5 cards/roundK♥6♥K♣4♥A♣1p
20we can use ANDECK(1,5)3♣5♦3♥9♠7♦1p
21To eliminate last row of 2 cards10♥9♠J♠5♦Q♠n
22we can extract only 10 rounds 8♦5♣6♥3♣K♥n
23with:
24ranking/hand(round)distribution/whole deck
25=ANDECK(1,5,10)a=PHR(D26#,1)=PHR(D26#,2)
263♣K♠10♠3♠7♦1prf0
27J♠Q♣Q♦3♦3♥2psf0
282♠9♠A♥9♦2♥2p4k0
298♦2♣K♦5♦4♦nfh0
308♠5♥A♠10♣K♣nf0
316♣J♥2♦7♥9♣ns0
327♠5♣7♣6♥Q♠1p3k0
339♥4♥A♣8♣J♦n2p2
3410♥4♠J♣A♦8♥n1p3
35Q♥K♥6♦10♦6♠1pn5
36
PHR 1
Cell Formulas
RangeFormula
P3,R3,T3,N25,J25,D25,W3P3=FORMULATEXT(P4)
P4:P22P4=PHR(J4:N22,1)
R4:R13R4=PHR(D4:H13,3)
T4:T13T4=PHR(J4:N22)
W4:X13W4=PHR(J4:N22,2)
D26:H35D26=ANDECK(1,5,10)
J26:J35J26=PHR(D26#,1)
N26:O35N26=PHR(D26#,2)
Dynamic array formulas.
PHR.jpg
 
AXMAS.xlsx
ABCDEFGHIJKLMNOPQ
1PHR for more decks (5). Cumulative stats of rankings distribution
2To be sure that no hands(rounds) can have duplicates we need to create a stack of single decks shuffled randomly.
3rankings
4rankings/rounddistribution/all 5 decksdistribution values only
5=PHR(C6:G55,1)=PHR(C6:G55,2)=PHR(C6:G55)
6deck 1=ANDECK(1,5,10)8♦2♣3♥Q♥5♣nrf00
7Q♠7♠10♥4♣10♠1psf00
8A♥2♥8♣5♠A♣1p4k00
910♣7♥K♠3♦7♦1pfh00
10A♠4♠6♥K♥J♥nf00
115♦7♣J♣Q♣2♠ns11
12K♣4♥2♦3♣10♦n3k00
135♥J♦9♠Q♦9♣1p2p11
146♠3♠9♥4♦8♥n1p2525
158♠K♦J♠A♦6♣nn2323
16deck 2=ANDECK(1,5,10)8♠A♥8♦4♠5♦1p
173♥6♦7♦Q♣5♠n
18J♣9♠9♦7♥4♣1p
194♥4♦9♥6♠2♥1p
20K♦K♠3♦J♠9♣1p
218♥3♣3♠2♣Q♠1p
22A♣A♠K♥2♠7♠1p
235♥10♥10♠8♣6♣1p
2410♦2♦J♦Q♦7♣n
255♣10♣A♦K♣J♥n
26deck 3=ANDECK(1,5,10)Q♣J♥5♣A♣10♠n
277♣J♠8♥K♦5♥n
286♦J♦8♣10♣2♣n
292♦4♠A♠4♣3♥1p
305♦7♠9♠8♠6♥s
314♥9♣Q♦7♥3♦n
32K♠10♥9♥2♥A♦n
33K♥7♦6♠Q♠J♣n
346♣A♥2♠10♦8♦n
35K♣4♦3♣3♠Q♥1p
36deck 4=ANDECK(1,5,10)10♥10♠3♥7♣J♦1p
376♣K♣2♠6♠A♣1p
38A♥8♦4♦10♣5♣n
398♠9♥3♣6♦10♦n
409♣9♦K♠Q♠A♠1p
415♦3♦9♠Q♦K♦n
42Q♣Q♥7♥4♠J♥1p
435♥7♠J♣K♥4♥n
448♣A♦8♥2♥4♣1p
452♦6♥7♦2♣3♠1p
46deck 5=ANDECK(1,5,10)K♦A♥K♠4♣J♠1p
472♦3♣2♥3♥4♥2p
489♦2♣A♠7♥5♠n
498♦Q♦10♦2♠Q♣1p
506♥J♣5♦8♥A♦n
515♥10♠7♠5♣6♠1p
526♣6♦3♠Q♠4♠1p
539♠7♣K♣4♦A♣n
54J♦10♥9♣10♣Q♥1p
558♠3♦8♣9♥7♦1p
56
PHR 2
Cell Formulas
RangeFormula
I5,K5,N5I5=FORMULATEXT(I6)
B6,B46,B36,B26,B16B6=FORMULATEXT(C6)
C6:G55C6=ANDECK(1,5,10)
I6:I55I6=PHR(C6:G55,1)
K6:L15K6=PHR(C6:G55,2)
N6:N15N6=PHR(C6:G55)
Dynamic array formulas.
 
Noticed that creating a big stack of shuffled decks, and hitting F9 a considerable number of times, the higher rankings like royal flush and straight flush, did not register occurrences. How many virtual decks we must shuffle until will start to get a straight flush or even a royal flush? This will represent one of many ways we can evaluate the "performance" of the randomizing "engine" in general, with a fun experiment like a virtual deck of cards.
So, why not to "automate" the process and create a virtual "stack" of large nr. of decks and accumulate the results. Here is the function, main engine, mighty REDUCE again:
Note: MAKEARRAY is used here only for cosmetics, the presentation of the result.
NPHR(n): N decks of cards, cumulative Poker Hands Rankings distribution.
n: integer >=1, nr. of virtual decks
Excel Formula:
=LAMBDA(n,
    LET(k,PHR(1,3),nk,REDUCE(0,SEQUENCE(n),LAMBDA(v,i,LET(d,ANDECK(1,5,10),v+PHR(d)))),
      MAKEARRAY(12,2,LAMBDA(r,c,SWITCH(r,1,IF(c=1,"Decks",n),12,IF(c=1,"Hands",SUM(nk)),IF(c=1,INDEX(k,r-1),INDEX(nk,r-1)))))
    )
)
AXMAS.xlsx
ABCDEFGHIJKLMNOPQR
1NPHR(n). The function. Cumulative rankings distribution for "n" decks of cards.
2
3=NPHR(10)=NPHR(50)=NPHR(100)=NPHR(500)=NPHR(1000)=NPHR(5000)
4Decks10Decks50Decks100Decks500Decks1000Decks5000
5rf0rf0rf0rf0rf0rf0
6sf0sf0sf0sf0sf0sf0
74k04k04k04k14k44k9
8fh0fh1fh0fh9fh10fh73
9f0f1f2f4f20f95
10s0s2s5s25s33s213
113k23k73k263k1013k2303k1052
122p42p302p662p2432p4962p2285
131p391p2051p4261p20501p41991p21206
14n55n254n475n2567n5008n25067
15Hands100Hands500Hands1000Hands5000Hands10000Hands50000
16
17
18After"dealing" 5,000 decks, 50,000 hands, still no "rf" royal flush or "sf" straight flush
19
NPHR 1
Cell Formulas
RangeFormula
A3,P3,M3,J3,G3,D3A3=FORMULATEXT(A4)
A4:B15A4=NPHR(10)
D4:E15D4=NPHR(50)
G4:H15G4=NPHR(100)
J4:K15J4=NPHR(500)
M4:N15M4=NPHR(1000)
P4:Q15P4=NPHR(5000)
Dynamic array formulas.
 
Let's raise the stakes for up to 200,000 virtual decks or 2,000,000 hands!
AXMAS.xlsx
ABCDEFGHIJKLMNOPQR
1For values of n>10000, calculation time takes some time (seconds for 10,000 and for 200,000 decks, or 2M hands close to 3min),
2so the following data are all copies as values of NPHR function results.
3
4Decks10,000Decks20,000Decks30,000Decks40,000Decks50,000
5rf0rf0rf0rf0rf1
6sf1sf3sf4sf5sf10
74k314k444k634k1004k117
8fh147fh290fh428fh616fh694
9f215f399f573f784f1017
10s378s730s1055s1381s1780
113k20833k42803k62873k84593k10670
122p47652p95302p142422p189222p23692
131p423161p843341p1263761p1687851p211706
14n50064n100390n150972n200948n250313
15Hands100,000Hands200,000Hands300,000Hands400,000Hands500,000
16
17
18Decks60,000Decks70,000Decks80,000Decks90,000Decks100,000Decks200,000
19rf2rf0rf1rf3rf1rf6
20sf9sf10sf10sf9sf18sf20
214k1354k1524k1774k2164k2374k492
22fh823fh991fh1175fh1205fh1493fh2879
23f1155f1399f1486f1673f1946f3909
24s2032s2444s2816s3209s3438s7188
253k124443k149313k169373k190083k213023k42001
262p286022p331582p382512p428012p472512p95213
271p2537501p2962431p3380881p3803581p4221441p844838
28n301048n350672n401059n451518n502170n1003454
29Hands600,000Hands700,000Hands800,000Hands900,000Hands1,000,000Hands2,000,000
30
31Notes:
32 - "nothing" occurrences almost half of all hands, all other rankings, the other half
33 - first "sf" for 10,000 decks
34 - first "rf" for 50,000 decks or half million hands
35 - 200,000 or 2,000,000 hands, exceeds physical real estate of a spreadsheet
36
NPHR 2
 
Great news!! Remember post #7, this thread? Quote:
"I believe in Santa, Excel's Santa. So, the other day, I wrote him a letter. It was a secret wish, but now I am going to disclose it. I've wished for more recursive iterations."
Check this out, latest MrExcel YT: New Excel Formula Editor Debuts - 2466
Among other nice "gifts" we received the one with "better recursion limits, 16x larger". How cool is that!!!
Thanks Excel Team, excellent work!!!! I think this forum, in the near future, will get its deserved traction. Thanks MrExcel.com team for creating this fabulous leading-edge lambda environment!!!!
(Seems that these gifts were lost in "transportation", that's way they did not get to us sooner) ✌☺️????
 
Happy 2022 Holidays All !!✌️
This year Mike was so kind to choose my lambdas as his traditional Xmas tree video.
Check this out. It also has the downloadable workbook link in the description or here
PS: Just seen on previous posts here a lot of ornaments not printed (apear as "?") and I remember they were ok 1 year ago. Something happened. I will check them later.
 
XMAS , same like AXMAS, replaced my good old AFLAT to TOCOL
XMAS same arguments as AXMAS
Excel Formula:
=LAMBDA(ht, sh, or,
    LET(
        t, UNICHAR(11088),
        i, UNICHAR(9618),
        p, UNICHAR(127873),
        o, TOCOL(or),
        n, ROWS(o),
        h, MAX(9, ht),
        s, MAX(3, sh),
        ns, INT(h / s),
        y, ns * s + 1,
        x, 2 * ns - 1,
        r, SEQUENCE(y),
        c, ABS(SEQUENCE(, x) - ns),
        a, QUOTIENT(r - 1, s) >= c,
        b, INDEX(o, RANDARRAY(y, x, 1, n, 1) * a),
        w, SWITCH(r, 1, t, 2, i, y, IF(c < ns - 2, p, ""), b),
        IF(a, w, "")
    )
)
and predefined array of ornaments "storage box" argument free lambda:
AO()
Excel Formula:
=LAMBDA(LET(q,SEQUENCE(44,,10035),UNICHAR(IF(q>10058,q+117698,q))))
Checking ornaments in mini-sheet, work OK
EIF Xmas Tree 2022.xlsx
ABCDEFGHIJKLMNOPQRSTU
1
2=XMAS(28,3,AO())
3 
4
5🌐
6🌞🌚
7🌕🌛
8
9🌕🌍🌜
10🌏
11🌜🌠
12🌕🌙🌑🌍
13🌗🌠
14🌖🌒🌝🌑
15🌙🌕🌠
16🌒🌎🌎🌕
17🌙🌜🌟🌙
18🌔🌘🌙🌏🌛🌚
19🌓🌞🌜🌑🌝
20🌙🌓🌗🌓🌝🌑
21🌚🌙🌞🌘🌕
22🌛🌠🌞
23🌜🌕🌏🌙🌏
24🌒🌗🌎🌝🌟
25🌖🌛🌗🌞🌐
26🌓🌠🌙🌔🌛🌠🌔🌎🌞🌍
27🌚🌐🌒🌖🌓🌘
28🌖🌏🌘🌞🌜🌙🌍🌝🌝
29🌠🌚🌓🌘🌓🌛🌏
30🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁
31
32
Sheet2
Cell Formulas
RangeFormula
C2C2=FORMULATEXT(C3)
C3:S30C3=XMAS(28,3,AO())
Dynamic array formulas.
 
Also, only CF that works (can be displayed in mini-sheet) is Color Scales
EIF Xmas Tree 2022.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBE
1CF color scales
2
3=XMAS(27,,AO())=XMAS(27,,SEQUENCE(20))=XMAS(27,,SEQUENCE(20))
4   
5
64
7🌔🌑61411
8🌕🌙151017
9🌙12115
10🌠🌠🌐759182
11🌏131413
12🌐🌘🌕1288128
13🌗🌚🌕🌎81532041014
14🌝🌎🌏114198121320
15🌙🌙🌗2125141255
16🌖🌝🌍🌑🌐🌛171103512102013
17🌖🌓🌗🌗🌏🌚31791473121211
18🌏🌚🌕🌙🌗1314810122158
19🌖🌗🌔🌠🌗🌒🌑🌗14121151210981842
20🌗🌑🌚10113171729131203
21🌗🌏🌙🌟🌛🌑18179116113133197
22🌒🌟🌍🌘🌠🌖🌝2151235315363511
23🌔🌒🌗🌎🌙75248141913622010
24🌑🌐🌞🌠16141681516141616631411
25🌛🌏🌛🌕🌒🌍🌑🌗14814461584661665511
26🌎🌟🌏🌘🌟🌓🌒🌖🌕131142041511811551011420
27🌙🌐🌏🌜🌙🌚🌞🌟🌖🌐56113731717111989168
28🌓🌍🌔🌜🌠🌝🌚🌚🌕🌔🌘316201612181714691910118188
29🌝🌘🌛🌘🌘🌓🌓🌔🌗8101531111113174579919712
30🌔🌟🌛🌐🌖🌙1811143111721201214208648
31🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁🎁
32
Sheet3
Cell Formulas
RangeFormula
B3,AM3,T3B3=FORMULATEXT(B4)
B4:R31B4=XMAS(27,,AO())
T4:AJ31,AM4:BC31T4=XMAS(27,,SEQUENCE(20))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
AM4:BC31Other TypeColor scaleNO
AM4:BC31Other TypeColor scaleNO
T4:AJ31Other TypeColor scaleNO
 

Forum statistics

Threads
1,223,935
Messages
6,175,493
Members
452,649
Latest member
mr_bhavesh

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