Matching of random pairs

I am trying to match people at random.

I want to create a table the lists all the available people. I would then like to have a button which lets me create random pairs of the people in that list. The output with the random pairs could be in the same table or in a separate table.

Any ideas how to achieve this? I have searched this forum and also had a long battle with ChatGPT, but without any success unfortunately.


On the page “Comparison of Random Generator Formulas” in the doc below, I do a comparison of the different formulas to generate random information.

It seems like RandomSample() will give you your answer. On its page you will find an example of using a table as source list.

Hope that helps.

Hi @C_Test

This was actually quite a fun little challenge. I’m assuming “real life” constraints - a person cannot be randomly paired with themselves, and a person can’t be randomly paired with two different people at the same time.

I’m sure there are other solutions, but here’s how mine works… To avoid dealing with circular references, my solution uses a column with random numbers to randomly sort the table. I then split the table in half and pair each person in the first half with a person at the same index in the second half.

Click the button at the top of the page to see it in action.


very nice @Jono_Bouwmeester

1 Like

Amazing, thank you very much!!

Thank you for sharing, I will dig through that.

You’re very welcome, @C_Test. Good luck with the rest of your build :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.