Listing all possible combinations (with/without repetition) with a few conditions

tonyleeocean

New Member
Joined
Apr 11, 2022
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi all -

There are 75 animals in my excel sheet, belonging to five species of animals (dogs, cats, pigs, rabbits and horses) respectively.

Each animal has 3 traits (1 major trait and 2 minor traits), and there are five types of traits in total for all animals (A, B, C, D, E).

Example as per below -
AnimalSpeciesMajor traitMinor trait 1Minot trait 2
KatieDogAEC
BobbyHorse BC
D​
..... etc.

I would like to categorize any 48 out of the 75 animals into 16 teams, with each team having 4 animals (3 main animals and 1 supportive animal).

However, there are conditions as to the composition of animals in each team.
  • Each team has 4 different species of animals
  • The 4 animals in each team could only have 4 types of traits, e.g., ABC-ACD-BCD-ABD and none of the animals in this team have trait E
  • The 3 main animals need to have 3 different major traits, e.g., none of the 3 main animals have same major trait of B, for example
  • The main animals cannot be chosen again as main animals of other teams (hence 48 main animals to be chosen at the end)
  • The supportive animals cannot be chosen again as supportive animals of other teams (hence 16 supportive animals to be chosen at the end)
  • The 16 supportive animals chosen MUST be from the 48 main animals, i.e. all of the 16 supportive animals are also the main animals in the 16 teams)
The final output would be 48 animals (out of the 75) in 16 teams (3 main animals and 1 supportive animal for each team).

Would really appreciate any guidance or even a start! Let me know if I could provide any further clarity :)
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Listing all possible combinations (with/without repetition) with a few conditions
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Dear Fluff,

Please help delete my post above as I need to further refine my conditions a bit, which impact on the generation of combinations. Thanks so much :)
 
Upvote 0
No need to delete the thread, just post your requirements to this thread.
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,217
Members
448,876
Latest member
Solitario

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
Back
Top