Hi - Dave here.
Happy Friday!
In my last email, I shared a
simple formula to create random groups of data.
This is a quick way to put rows of data into random groups, but the number of rows in each group will vary because the data is
truly random.
Is it possible to create random groups of equal size? Yes!
The formula is longer because we need to perform some math. The basic process looks like this:
1. Generate random numbers for each row
2. Rank the random numbers
3. Count groups and calculate the ideal group size
4. Divide each rank by the group size
5. Round the results up to the nearest whole number
6. Use the whole number to fetch a group name with INDEX
You can see the result in the workbook below, where there are 18 names, and each group ends up with 6 people:
[
Download the workbook and read the full explanation]
The formula above will work in any version of Excel. In the latest version of Excel, it is possible to use the RANDARRAY function in a single dynamic array formula that creates all groups at the same time. This is a nice upgrade because we can get rid of the helper column altogether. The article at the link above provides a full explanation for both formulas and approaches. Download the workbook and try it out yourself.
Excel formulas
We maintain a list of over 500 working formulas
here.
If you need more structure, we also offer
video training.
Have a great weekend!
Dave