Randomly assign groups excel

Sometimes, you may want to randomly assign data to groups as screenshot 1 shown, or generate groups for a list of names as below screenshot 2 shown, but how can handle these jobs quickly? Actually, in Excel, you can use formulas to solve them easily.

Screenshot1 Screenshot2
a screenshot showing random data assigned to a group a screenshot showing random data assigned to a list of names

Randomly assign data to groups

If you want to randomly assign data to a specified number of groups, each group is allowed with different numbers of data, you can use the CHOOSE and RANDBETWEEN functions.

Select a blank cell next to the list you want to assign to random groups, copy or type this formula

=CHOOSE(RANDBETWEEN(1,3),"Group A","Group B","Group C ")

In the formula, (1, 3) indicates to group data into 3 groups, Group A, Group B and Group C are the texts will be displayed in formula cells which used to distinguish different groups.

a screenshot of using formula to randomly assign data to groups

Then drag fill handle down to randomly assign data into groups.

Then the list of data has been randomly assigned to groups, and each group may have different numbers of data.

The calculated results will not be fixed, they will be recalculated if there is any change to the workbook.

a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

Generate random groups in a specified data size

If you want to generate random groups for a list of data, and each group has a specified data size, you can use the ROUNDUP and RANK functions.

1. Firstly, you need a helper column to list some random data next to your data. Supposing in cell E2, type this formula

Then drag fill handle down to fill this formula to cells you use.

2. In the next column, supposing in cell F2, copy or type this formula

E2:E13 is the range that contains formula =RAND(), 4 is the number of data that you want each group contains.

a screenshot of using formula to generate random groups in a specified data size

The drag fill handle down to generate random groups for the list of data.