+ Reply to Thread
Results 1 to 4 of 4

Filling sheet with unique random numbers

  1. #1
    Registered User
    Join Date
    06-27-2009
    Location
    USA, PA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Filling sheet with unique random numbers

    I need a macros to fill 2000 rows with unique random numbers from 1 to 19 in B2:T2001 area.
    Every row like this
    14 11 12 7 18 13 19 5 6 16 9 4 8 15 1 3 10 2 17
    Actually it's about random positions in rows for numbers from 1 to 19.
    Different solutions are welcome.
    Thanks.
    Last edited by rnd37; 06-27-2009 at 07:53 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Filling sheet with unique random numbers

    Select B2:T2 and array-enter either =RandSeq() or =RandSeq(True) (the latter if you want the sequence to change each time you calculate.

    Then drag down as far as you want.

    Here's the function:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-27-2009
    Location
    USA, PA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Filling sheet with unique random numbers

    Just tried this UDF. Works great and very fast. Thanks shg!
    Need to fill 1458 sheets, so will ask for help if it gives any repetitions.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Filling sheet with unique random numbers

    You're welcome.
    ... will ask for help if it gives any repetitions
    It's certainly possible, but the chances are way beyond slight in 2000 rows x 1458 sheets.

+ 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