Forum Discussion
philBar585
Apr 08, 2024Copper Contributor
named golf players duplicated in the order of play. Used formula in each order of play
using formula :- ==@INDEX($B$5:$B$12,RANK(C6,$C$5:$C$12))
PeterBartholomew1
Apr 09, 2024Silver Contributor
I haven't much of an idea what is required but at least this was entertaining!
What is did was to use lori_m 's random number generator to assign a pseudo-random integer to each name. Then sort the names by the random number and divide into pairs.
= LET(
rand, PseudoRandλ(ROWS(player), seed),
list, SORTBY(player, rand),
WRAPROWS(list, 2)
)
where the pseudo-random number generator is given by Lorimer Miller's
PseudoRandλ
= LAMBDA(length, [seed],
TAKE(
SCAN(
IF(ISOMITTED(seed), 123456789, seed),
SEQUENCE(length,,, 0) * {13, -17, 5},
LAMBDA(s, i, BITXOR(s, BITAND(BITLSHIFT(s, i), 2^32 - 1)))
),
,
-1
)
)