+ Reply to Thread
Results 1 to 5 of 5

Random Assignment

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-18-2009
    Location
    Winnipeg
    MS-Off Ver
    Excel 2003
    Posts
    203

    Random Assignment

    I am doing a pool for the show The Bachelor. I need to assign each of my "people" with a "contestant" at random.

    I have a sheet with 2 columns of data.

    Column A has 28 people in rows 2:29
    Column H has 28 contestants in rows 2:29

    What formula can I put in Column C to randomly assign a "contestant" from H with no duplicates?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,792

    Re: Random Assignment

    Try this array formula in C2, copied down:

    =INDEX($H$2:$H$29, LARGE(MATCH(ROW($H$2:$H$29), ROW($H$2:$H$29))*NOT(COUNTIF($C$1:C1, $H$2:$A$29)), RANDBETWEEN(1, ROWS($H$2:$H$29)-ROW(A1)+1)))

    Confirm the formula by clicking CTRL+SHIFT+ENTER.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Random Assignment

    One way...

    Data Range
    A
    B
    C
    D
    E
    1
    2
    Person1
    Contestant10
    ------
    Contestant1
    0.29709
    3
    Person2
    Contestant1
    Contestant2
    0.928436
    4
    Person3
    Contestant9
    Contestant3
    0.379672
    5
    Person4
    Contestant5
    Contestant4
    0.968651
    6
    Person5
    Contestant3
    Contestant5
    0.335273
    7
    Person6
    Contestant7
    Contestant6
    0.92306
    8
    Person7
    Contestant8
    Contestant7
    0.579124
    9
    Person8
    Contestant6
    Contestant8
    0.787099
    10
    Person9
    Contestant2
    Contestant9
    0.308314
    11
    Person10
    Contestant4
    Contestant10
    0.167977


    Enter this formula in E2 and copy down as needed.

    =RAND()

    Enter this formula in B2 and copy down as needed.

    =INDEX(D$2:D$11,MATCH(SMALL(E$2:E$11,ROWS(B$2:B2)),E$2:E$11,0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    11-18-2009
    Location
    Winnipeg
    MS-Off Ver
    Excel 2003
    Posts
    203

    Re: Random Assignment

    Thank You!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,792

    Re: Random Assignment

    You are most welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Generating a list of Random numbers of random length...
    By Growl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2013, 12:10 PM
  2. Replies: 3
    Last Post: 09-30-2012, 03:03 PM
  3. [SOLVED] Ordering random letters for a chance-random based TV gameshow.
    By Askalian in forum Excel General
    Replies: 4
    Last Post: 06-19-2012, 02:26 PM
  4. random assignment of subjects to treatment groupw
    By ctm59 in forum Excel General
    Replies: 4
    Last Post: 01-09-2006, 03:35 PM
  5. Non-random numbers generated by excel's data analysis random gener
    By Allie in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-17-2005, 02:05 AM
  6. [SOLVED] Re: Non-random numbers generated by excel's data analysis random gener
    By Harlan Grove in forum Excel General
    Replies: 2
    Last Post: 09-13-2005, 12:05 PM
  7. Random Assignment of Numbers
    By itse in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-16-2005, 11:06 PM
  8. How do I find random number in list of random alpha? (Position is.
    By jlahealth-partners in forum Excel General
    Replies: 0
    Last Post: 02-08-2005, 02:06 PM

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