Excel Rand

Copper Contributor

I am trying to select random numbers between 1 & 39 using this formula =RANDARRAY(6,3,1,39,TRUE)

I keep getting duplicate numbers.  How do I fix this?

1 Reply
@Lou_Ann1953 RANDARRY does no more than generate an array of random numbers. When you choose [Integer=TRUE] as the output type, the chance of duplication is eminent. Use FALSE in stead. That will produce random numbers with a precision of 14 decimals. Chance for duplication becomes minimal.
 
First generate a list of 39 random numbers. Then fix these by copy/paste values. Now rank them and pick the first 18 ranking numbers (i.e. 6 x 3) to generate your output array of 6 rows, 3 columns with unique random numbers between 1 and 39.
 
Example file attached.