Forum Discussion

Frank3821's avatar
Frank3821
Copper Contributor
Jul 27, 2025

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

    • Frank3821's avatar
      Frank3821
      Copper 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_tarler's avatar
        m_tarler
        Bronze 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

Resources