Generating names for groups

Tigerexcel

Active Member
Joined
Mar 6, 2020
Messages
493
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Group allocator.xlsx
ABCDEFGHIJKLMN
1How many people?21
2NameRandRank GroupingTeamTeam size7Team no.Count
3Vic0.84372440.571429118
4Bob0.55133691.285714226
5Kev0.78557460.857143137
6Mary0.529755101.428571240
7Fred0.97447410.142857150
8Steve0.522386111.571429260
9Jack0.67176381.142857270
10Jake0.040347192.714286380
11Mick0.92692320.2857141
12Tom0.203266162.2857143Team 1Team 2Team 3Team 4Team 5Team 6Team 7
13Jess0.232937152.1428573
14Jo0.057397182.5714293
15Joe0.90526930.4285711
16Sue0.751883711
17Sharon0.81832250.7142861
18Noel0.183788172.4285713
19Jack S0.521619121.7142862
20Alan0.329118152.1428573
21Mike0.356218131.8571432
22****0.86409840.5714291
23ken0.21202172.4285713
Sheet1
Cell Formulas
RangeFormula
H1H1=ROWS(Table1[Team])
C21,C3:C19C3=RANK(B3,$B$3:$B$21)
D3:D23D3=C3/$H$2
E3:E23E3=CEILING(D3,1)
C20,C23C20=RANK(B20,$B$3:$B$23)
C22C22=RANK(B22,$B$3:$B$22)
K3:K10K3=COUNTIF(Table1[Team],J3)


The idea here is to produce lists of names that belong to each allocated group once the main spreadsheet has randomly allocated the names to the groups.
Desired output under Team 1 would have Vic, Kev, Fred, Mick etc. so anyone who records a 1 under Team. Under Team 2 would be Bob, Mary, Steve etc.

This output would be listed under Team 1, Team 2 etc. which are H12, I12 etc.

Column B has a formula for randomising the data, RAND(), I've converted this column to values for the sake of this example but I do have another problem with this spreadsheet. The groups don't always come out evenly and in this instance with 21 people I get groups of 8,7 and 6 instead of 3 groups of 7 which is what I need. I find that I need to recalculate a few times before the groups are even, perhaps my formulae could be improved upon. Looking for a formula/function solution to both the output and if possible the even group creation.
 

Tigerexcel

Active Member
Joined
Mar 6, 2020
Messages
493
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I was actually typing a reply:
Let's break down the formula: $F$2*COLUMNS($H$2:H$2))-ROWS(H$2:H2)+1

It's size * columns, so you get 7, 14 , 21, 28, etc. Then subtract rows 0, 1, 2, 3 until the row number exceeds the team size, indeed like you said the IF-part.
Thanks Gra, very nice. Mine involved an array which required the use of the SMALL function as well as MIN etc.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,186,083
Messages
5,955,730
Members
438,213
Latest member
ngvicu

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
Top