Hi,
I have a task of selecting 50 winners from a list of 1200 plus names. The 50 winners must be randomly selected and each winner can only be selected once (no duplicates). I am using ID numbers that are specific for each individual (because of duplicate names). I am using Excel 2003 and I am unfamiliar with VBA code. Below is my starting point of this exercise, but I am getting duplicates which I don't want.
Sheet 2 is the list of ID's and Names with a header of A1 is ID and B1 is Names. A2:A1221 is the list of ID's and B2:B1221 is the list of corresponding names.
Sheet 1
A2:A51 is numbered 1 to 50 (for the 50 winners needed)
B1 is titled ID
B2:B51 has a formula of
=INDEX(Sheet2!$A$2:$A$1221,RANDBETWEEN(1,COUNTA(Sheet2!$A$2:$A$1221)),1)
C1 is titled Name
C2:C51 has a formula to match the ID to the correct name
=VLOOKUP(B2,Sheet2!$A$2:$B$1221,2,FALSE)
I have set calculations to run manually but I have to cycle thru the list (F9) a few times due to duplicates. How can I pick 50 random winners without creating duplicates.
I have a task of selecting 50 winners from a list of 1200 plus names. The 50 winners must be randomly selected and each winner can only be selected once (no duplicates). I am using ID numbers that are specific for each individual (because of duplicate names). I am using Excel 2003 and I am unfamiliar with VBA code. Below is my starting point of this exercise, but I am getting duplicates which I don't want.
Sheet 2 is the list of ID's and Names with a header of A1 is ID and B1 is Names. A2:A1221 is the list of ID's and B2:B1221 is the list of corresponding names.
Sheet 1
A2:A51 is numbered 1 to 50 (for the 50 winners needed)
B1 is titled ID
B2:B51 has a formula of
=INDEX(Sheet2!$A$2:$A$1221,RANDBETWEEN(1,COUNTA(Sheet2!$A$2:$A$1221)),1)
C1 is titled Name
C2:C51 has a formula to match the ID to the correct name
=VLOOKUP(B2,Sheet2!$A$2:$B$1221,2,FALSE)
I have set calculations to run manually but I have to cycle thru the list (F9) a few times due to duplicates. How can I pick 50 random winners without creating duplicates.