Forum Discussion
Help with a formula
I need some help with writing a formula... I need a formula that is 1 column by 5 rows, that generates a random non repeating integer between 1 & 15. I have tried =(RANDARRAY((5),(1),(1),(15),(TRUE))) but this will allow repeating numbers. I have tried =UNIQUE((RANDARRAY((5),(1),(1),(15),(TRUE)))) but upon F9 it will at times only generate 4 numbers.... Anyone got any ideas?
3 Replies
- m_tarlerBronze Contributor
try
=TAKE(SORTBY(SEQUENCE(15),RANDARRAY(15)),5)- Frank3821Copper Contributor
thank you.. I should have put my actual range... I need between 25 & 75
I'm not sure where to plug those values in to that formula.....
- m_tarlerBronze Contributor
try this:
=TAKE(SORTBY(SEQUENCE(51,1,25),RANDARRAY(51)),5)so basically the SEQUENCE creates the array of all possible numbers (25-75 which is 51 numbers in 1 column starting at 25)
then create a matching length array of random numbers using RANDARRAY
then SORT the number list by that random array
then TAKE the first 5