+ Reply to Thread
Results 1 to 4 of 4

Random number sequence

  1. #1
    Forum Contributor
    Join Date
    06-10-2004
    Posts
    121

    Random number sequence

    I want to fill a column with the numbers 1 to 20, in a random sequence with no repeats, any ideas?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You could try this

    Put this formula in B1 and copy down to B20

    =RAND()

    in A1 copied down to A20

    =RANK(B1,B$1:B$20)

    A1:A20 now contains your randomly arranged 1-20. Hide column B if you wish. Random numbers will change whenever worksheet is re-calculated (hit F9 to initiate that)

  3. #3
    Forum Contributor
    Join Date
    06-10-2004
    Posts
    121
    Thanks daddylonglegs, just the job, I didn't think of ranking them.

  4. #4
    Forum Contributor
    Join Date
    09-25-2004
    Posts
    269
    Input formula in cell A2 and copy down. This formula will not generate any repeats.


    =SMALL(IF(COUNTIF($A$1:A1,ROW($1:$99))<>1,ROW($1:$99)),1+INT(RAND()*(99-ROW()+ROW($A$2))))

    The formula is an-array must hold down:

    Ctrl,Shift,Enter

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1