I have a question about UNIQUE
function for random number generation in multi-dimension array.
As you can see, I try to generate an array with random and unique numbers of 1->100 inside 5X5 array.
I try both MAKEARRAY
and RANDARRAY
with the UNIQUE
in hopes that it can generate random number, but it still produces duplicate numbers (highlighted in red).
Here are the formulas used:
=UNIQUE(MAKEARRAY(5,5,LAMBDA(row,col,RANDBETWEEN(1,100))),,TRUE)
=MAKEARRAY(5,5,LAMBDA(row,col,UNIQUE(RANDBETWEEN(1,100),,TRUE)))
=UNIQUE(RANDARRAY(5,5,1,50,TRUE))
Is there any workaround for this (or any unknown hidden function in Excel)?