Unique Random Non-repeating Names From List

  • I have a formula-generated defined list of names. I need to select them in random order without duplication and without choosing any blanks in the list. Thanks in advance

  • Re: Unique Random Non-repeating Names From List


    If the names are in A1:An, then you can put this formula in B1 and copy down to Bn:


    = if( A1="", "", rand() )


    Then sort by column B.

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

  • Generate Unique Random Names


    Hello,
    I am re-posting this with a better explanation. I have 4 columns (A-D) of golfers names (including blanks). I need to choose a random name from Column A, 1 from B, etc. to create foursomes without repeating a name. Each group must be unique each time I use it. These could go into Columns E-H. Please help!!!


    Many Thanks,
    drltr6

  • Re: Generate Unique Random Names


    you can use this line of code for generating integers within a given range


    Int((upperbound - lowerbound + 1) * Rnd + lowerbound)


    to check fr uniqueness you can use an IF statement within a LOOP....however it is difficult to write code for the same without knowing your data structure etc


    PS-do the same names occur in multiple columns...if not then why check for uniqueness...also it is not advisable to have blanks within a database

  • Re: Generate Unique Random Names


    The approach I suggested yesterday will work, assuming that pangolin is correct that the same name does not appear in multiple columns. Put the golfers' names in columns A, C, E, and G (i.e., a blank column between each). Let's say there are 12, 10, 14, and 13 names in each column respectively.


    In column B, enter the formula =RAND() and copy it down to row 12. Select columns A and B, and sort by column B. The 12 golfers in column A are now in random order without repeats.


    In column D, enter the formula =RAND() and copy it down to row 10. Select columns C and D, and sort by column D. The 10 golfers in column C are now in random order without repeats.


    Do the same for columns E & F and G & H.


    Rows 1 through 10 contain complete foursomes, and rows 11-14 contain incomplete foursomes.

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

  • Re: Unique Random Non-repeating Names From List


    I was doing a similar thing, and tried this. It looks like it will work for what we want to do. But I have one question. Once you have all the names in, I created a macro to run that will sort the numbers, as you state in the instructions, but...you will have to be sure that no changes are made, because it re-sorts everything every time you do something. Unless you know of a way to stop it from doing this, then you have to get your final foursomes, PRINT, before someone does something to re-sort it again...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!