Lambda ARRAY.SHAKE

New Contributor

My native language is German, so I use a Creating-Sub for the Lambda (with selfexplaining content):

 

 

Sub InsertAndUseOfALambdaFunction()
ActiveWorkbook.Names.Add Name:="ARRAY.SHAKE", RefersToR1C1:= _
"=LAMBDA(a,LET( x,ROWS(a), y,COLUMNS(a), z,RANDARRAY(x*y), v,MATCH(z,SORT(z)), u,INDEX(v,SEQUENCE(x,,0)*y+SEQUENCE(,y)), INDEX(a,TRUNC((u+y-1)/y),MOD(u-1,y)+1)))"
ActiveWorkbook.Names("ARRAY.SHAKE").Comment = ""
Range("A1").Formula2R1C1 = "=ARRAY.SHAKE({""will"",""Covid"",""ever"",""end""})"
End Sub

 

 

 

0 Replies