• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Generate Random Name No Repeat

delta

Member
sheet1 in A2:A1200 contain student name when click on button generate random name in Cell D1 but do no repeat name. how it is work
 
In B2 type =rand() and copy down
In C2 type =RANK(B2,$B$2:$B$1201,1)+COUNTIF($B$2:$B$2,B2)-1 and copy down
In D2 type =INDEX(A2:A1201,MATCH(1,C2:C1201,0))
 
The attached workbook generates random numbers in descending order. Clearly a simple lookup could turn this into a list of student names sorted in alphabetical order.

If the sheet takes a little longer to calculate than you might expect, bear in mind that it has generated 50 such random sequences, assigned the values to bins and plotted the distribution of values across the bins for each draw.

Must have had too much time on my hands at some point! ;)
 

Attachments

  • temp - Lottery Forecast.xlsx
    190.7 KB · Views: 8
Back
Top