+ Reply to Thread
Results 1 to 8 of 8

pick a name out of list of 20 names without repeating names picked

Hybrid View

  1. #1
    Registered User
    Join Date
    07-03-2013
    Location
    Coquitlam, BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    pick a name out of list of 20 names without repeating names picked

    This formula index table does not work for me for picking one name out of list of 20 names. I want Excel to pick names like picking names out of a hat and not repeat the pick of names ever again until all names are picked. Cell A1 is label "Name" and all names fall below lable "Name" from A2:A21 In Cell C1 is label "Random_Picks" with all formulas below in C2:C21
    Why does it not work and only shows zeroes in C2:C21 How do I get Excel to pick names from cells A2:A21 once until all names are picked?


    Name Random_Picks
    Richard =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$2:C25,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$2))))+1))
    Neil =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$3:C26,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$3))))+1))
    Larry =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$4:C27,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$4))))+1))
    Mike =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$5:C28,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$5))))+1))
    Jeff =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$6:C29,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$6))))+1))
    Harry =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$7:C30,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$7))))+1))
    Bill =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$8:C31,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$8))))+1))
    Pete =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$9:C32,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$9))))+1))
    Sparky =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$10:C33,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$10))))+1))
    Joe =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$11:C34,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$11))))+1))
    Sam =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$12:C35,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$12))))+1))
    Travis =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$13:C36,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$13))))+1))
    Kyle =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$14:C37,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$14))))+1))
    Mario =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$15:C38,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$15))))+1))
    Brian =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$16:C39,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$16))))+1))
    Bill =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$17:C40,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$17))))+1))
    George =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$18:C41,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$18))))+1))
    Kevin =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$19:C42,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$19))))+1))
    Phil =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$20:C43,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$20))))+1))
    Mark =INDEX($A$2:$A$21,SMALL(IF(ISNA(MATCH($A$2:$A$21,$C$21:C44,0)),ROW($A$2:$A$21)-ROW($A$2)+1),INT(RAND()*(ROWS($A$2:$A$21)-(ROW()-ROW($C$21))))+1))

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

    Re: pick a name out of list of 20 names without repeating names picked

    See this...

    https://www.excelforum.com/showthread.php?t=974775
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: pick a name out of list of 20 names without repeating names picked

    Hi,

    c2=
    Formula: copy to clipboard
    =INDEX($A$2:$A$21,MATCH(0,COUNTIF($C$1:C1,$A$2:$A$21),0))


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Click just below left if it helps, Boo?ath?

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

    Re: pick a name out of list of 20 names without repeating names picked

    Quote Originally Posted by boopathiraja View Post

    =INDEX($A$2:$A$21,MATCH(0,COUNTIF($C$1:C1,$A$2:$A$21),0))
    That won't generate the list in random order.

  5. #5
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: pick a name out of list of 20 names without repeating names picked

    Yes, misread the post it will generate only uniques...

  6. #6
    Registered User
    Join Date
    07-03-2013
    Location
    Coquitlam, BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: pick a name out of list of 20 names without repeating names picked

    Wow a lot of great help from everyone and I really appreciate it and thanks so much.
    That was a quick response from everyone!
    However, I tried Ctrl Shift Enter and got the braces showing up on both sides of formula but results are still zeroes in column C with no names.
    I tried the other formulas from people in this thread but as I am no expert in Excel I can't seem to get it to work. Sorry but I must be doing something dumb somewhere.
    I have Excel 2010 and have just slowly over the years been learning Excel in a small way. I will keep trying and reading and hopefully get answers eventually........ any other ideas what I am doing wrong..... I appreciate the help!

  7. #7
    Registered User
    Join Date
    07-03-2013
    Location
    Coquitlam, BC Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: pick a name out of list of 20 names without repeating names picked

    Wow I finally got it to work. Thank you so much everyone! Actually it was a bit of everyones input but I finally got the last bit to work from link from Tony Valko and reading boopathiraja explanation. Thanks a bunch!

+ 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. How to List Only Non-repeating Names?
    By omaral in forum Excel General
    Replies: 4
    Last Post: 03-05-2014, 04:07 PM
  2. Pick rabdom names from list of names
    By Fixzy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2013, 05:45 PM
  3. Pick random names from list
    By ThomB in forum Excel General
    Replies: 3
    Last Post: 04-08-2013, 10:55 AM
  4. random pick names from a list
    By jladika in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-06-2011, 05:31 PM
  5. random pick names from the list
    By jinvictor in forum Excel General
    Replies: 1
    Last Post: 06-26-2006, 10:10 AM

Tags for this Thread

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