How to get randomly assigned groups into equal amounts?

bwe89

New Member
Joined
Jul 28, 2016
Messages
4
Hi everyone,

I am using =CHOOSE(RANDBETWEEN(1,2),"A","B") to randomly assign data into two groups A & B. But when I do for 120 contacts does not group them into two equal groups of 60, which is what I want. Instead, it will have one group with 68 and the other with 52.

Does anyone know a solution to make randomly assigning groups happen in equal quantities?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You could just use RAND to assign a random number to each contact, then use SMALL and group everyone below the n/2 th value into one group, and everyone else into the other:

ABCDE
1Contact 10.123612AAsBs
2Contact 20.309422A1010
3Contact 30.334354A
4Contact 40.621878A
5Contact 50.877647B
6Contact 60.777637B
7Contact 70.733063B
8Contact 80.193756A
9Contact 90.942704B
10Contact 100.156775A
11Contact 110.772948B
12Contact 120.542172A
13Contact 130.134582A
14Contact 140.784151B
15Contact 150.865734B
16Contact 160.498663A
17Contact 170.912226B
18Contact 180.847757B
19Contact 190.699894A
20Contact 200.795236B

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet6

Worksheet Formulas
CellFormula
B1=RAND()
C1=IF(B1<=SMALL(B$1:B$20,10),"A","B")
D2=COUNTIF(C:C,"A")
E2=COUNTIF(C:C,"B")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,939
Latest member
Leon Leenders

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