+ Reply to Thread
Results 1 to 4 of 4

Randomizer with out duplicates

  1. #1
    Registered User
    Join Date
    07-15-2009
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2003
    Posts
    2

    Randomizer with out duplicates

    Is there a formula that I can put into a range of cells that will populate the cells with random names from a list...without duplicates?

    For example I have a list in A1- A16. I then have =RAND() in C1 - C16. I then have =INDEX(A:A,COUNTA(A:A)-RANK(C1,C:C)) in D1-D16. With C1 ascending accordingly.

    Lastly, I have a macro in a form of button with the following code.

    Sub Randomize()
    '
    ' Randomize Macro
    '
    '

    '
    Calculate
    End Sub

    Thanks so much in advance!

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Randomizer with out duplicates

    try ranking the random numbers uniquely
    =RANK(C1,$C$1:$C$400)+COUNTIF($C$1:C1,C1)-1
    then just index match against how many you need
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

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

    Re: Randomizer with out duplicates

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    07-15-2009
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Randomizer with out duplicates

    Thank you very much martindwilson. And thank you for the quick response.

+ 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