Matching randomly with restrictions (EXCEL)

Hey guys!

Starting from the 3 tables on the left, I need to configure the robot so that the tables on the right contains:

  • Each table must have 1 type of food (1 fruit, 1 meat, 1 fish)
  • The names of each table on the right has to have 3 names. Each of them must come from different tables on the left. So for instance, Name 7 and Name 8 can’t be together on the right.

A possible solution is shown:

I think first I should “read range” of the tables on the left. After that, using “for each” I should look for “fruit”, “meat” and “fish” and then associate to the tables on the right. However, I don’t know how I can avoid that any name on the left is located on the same table on the right…

Please I need help… I highly appreciate your help…
Thanks a lot…


sample.xlsx (10.2 KB)