Random Generator - lucky draw winners

stu_mac

New Member
Joined
Feb 22, 2011
Messages
2
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.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
This is easier with VBA. But here is what I would do.
Create a pivot table of your names with say names and counts.
Copy and paste this list of now unique names in to a new tab.
Create random numbers next to said names, sort and take the top 50.
 
Upvote 0
I would love to use VBA but I am unfamiliar with writing code. Are there any VBA solutions to this problem?
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,683
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top