Within our participant management, I've got a list with a couple of names, which I want to assign to randomized groups of two every month. However, there are some criterias to be considered.
- The pair must have chosen the same timeslot.
- The pair doesn't work in the same team.
- The pair should not have been paired the previous month.
- The pair has to match exactly in both directions, e.g. Person 2 cannot be paired with person 3 if person 2 is already paired with person 1
Registration is optional for people each month, which is why some may not have had a partner in the previous month.
There are 5 teams and 5 Timeslots in total and up to 50 participants can register. Please note: It is very unlikely that the same amount of participants will register from each team.
I am aware that due to the uneven distribution of team members and the numerous criteria, there will rarely be an exact result.
If there is one person left over due to an odd number of participants, no problem. Even if people could not be paired within the different timeslots, this is not a problem. Remaining persons must then be paired manually without considering the desired timeslots.
Below is an example of my table:
Name |Team |Timeslot |Partner in previous month |New Partner
Person 1| Team b| 26.04.2021 16:00 - 16:30 Uhr |Person 5|
Person 2| Team a| 27.04.2021 10:30 - 11:00 Uhr |
Person 3| Team c| 28.04.2021 12:00 - 12:30 Uhr |Person 9|
Person 4| Team e| 29.04.2021 14:00 - 14:30 Uhr |
Person 5| Team d| 30.04.2021 11:00 - 11:30 Uhr |Person 1|
What I've tried so far:
I was already able to find a formula through this forum considering the timeslots and teams. However, criteria 3 and 4 are still missing. In column E I have entered the following formula (example from cell E2):
=INDEX(A:A,MATCH(1,(C:C=C3)(B:B<>B3)(COUNTIF(E$1:E1,A:A)=0),0))
Basically I am open to both, a solution via formulas or Google Script.
I appreciate any solution to this issue and thank you in advance for your support!
Kind regards
Aucun commentaire:
Enregistrer un commentaire