1
votes

My company organizes trips for large groups and has been manually putting the groups together based on their preferences which is very time-consuming and tedious. I'm hoping to learn a way to get the data automatically sorted in the best way possible.

For instance, everyone going on the trip gives us their their top three preferences for a group partner (who may or may not be going on the trip) and we try to get them in a group with at least two of their top three preferences if possible.

Here's a small example of how we receive the data in Google Sheets (as you can imagine, the larger the data set the more complex the manual sorting gets):

https://docs.google.com/spreadsheets/d/1H5vrAZdztsCcVvGPP_TR2bqeHKuWggYqIoCZ54DPWVg/edit#gid=0

Can anyone share some potential solutions that would allow me to sort the data into groups with these conditions, at least to the extent possible?

From your table I see that Brad very likes Tod, but Tod can't stand Brad. I suspect the fancy task have no ultimate solution. I can be wrong, though. - Yuri Khristich