# Need help in excel for combinations



## Centurion4246 (Dec 26, 2022)

Where I have two types of employees clase in class D and I need to get all the combinations possible so these employees can work together Princetons in row or column a I would have 25 employees, and in column D I will have another 25 employees, two different classes type of employees. The thing is is column and column B have to work together and I need to see the combinations where I can see all the possibilities as partners I have been trying to do this for about a month and it does not work and I’m having issues.


----------



## Eric W (Dec 26, 2022)

Welcome to the MrExcel forum!

Try:

Book1ABCDEFG1Class AClass DCombinations2AnnAlAnnAl3BeyonceBobAnnBob4CarolCalAnnCal5DebDanAnnDan6ElayneBeyonceAl7FranciscaBeyonceBob8BeyonceCal9BeyonceDan10CarolAl11CarolBob12CarolCal13CarolDan14DebAl15DebBob16DebCal17DebDan18ElayneAl19ElayneBob20ElayneCal21ElayneDan22FranciscaAl23FranciscaBob24FranciscaCal25FranciscaDan26Sheet2Cell FormulasRangeFormulaF2:G25F2=LET(rnga,A2:A11,rngb,D2:D11,ra,COUNTA(rnga),rb,COUNTA(rngb),s,SEQUENCE(ra*rb,,0),CHOOSE({1,2},INDEX(rnga,INT(s/rb)+1),INDEX(rngb,MOD(s,rb)+1)))Dynamic array formulas.

Just change the ranges to match your sheet.


----------



## Centurion4246 (Dec 27, 2022)

Eric W said:


> Welcome to the MrExcel forum!
> 
> Try:
> 
> ...


Eric, thank you so much for the help... you have solved it 95% of the way which is a huge help. I am sorry to continue to ask questions, is there anyway to mix it up, referencing your sheet, ANN, DEB, CAROL cannot work together, however ANN, DEB, CAROL, BOB DAN, CAL can. Is there a way where in addition to the what you did, it can jumble it up also at the same time. 

Happy Holidays, and again thank you so so much you have helped a great deal.


----------



## Eric W (Dec 27, 2022)

I'm a little unsure what you're asking.  Are you asking for groups of more than 2?  The list I gave is every combination of a name from column A with a name from column D.  Is there some way of deciding who can work with who?  Jumbling up the order is easy enough, I can just sort by a random array, but does that make a difference?  All the combinations will still be there.  Can you show, given the sample list, what your expected result is?


----------



## Centurion4246 (Dec 28, 2022)

Eric W said:


> I'm a little unsure what you're asking.  Are you asking for groups of more than 2?  The list I gave is every combination of a name from column A with a name from column D.  Is there some way of deciding who can work with who?  Jumbling up the order is easy enough, I can just sort by a random array, but does that make a difference?  All the combinations will still be there.  Can you show, given the sample list, what your expected result is?


Good Morning Eric, 
I am going to upload a example of what I use now in the company. I did for one location our 3 largest client. Understand I have been doing this by picking and choosing so I only did a couple I am sure you will get the idea of what I am trying to explain. I have also written a description of everything in the excel package. I really appreciate all the help.


----------



## Centurion4246 (Dec 28, 2022)

I have done a generic worksheet for the example. Currently we do this by picking out names and putting them into columns and rows, but that is taking all day, and is very time consuming. The formula you gave me the other day was great helped out tremendously. Per your request this is what I was referring to. Each row would have a different combination for group 1 and 2. The reason I need to do it like this is because several of my employees decided to sue the company for favoritism because they stated some people were getting the easier posts. So the company had to do a out of court settlement and I have been doing this now at all of our locations, but again this is very time consuming. This way, we cannot be sued again for there same reason. We would use this for each location.Site ADay 1 (Example )Day2Day 3Day 4 and So onGroup 1Group 2InvestigatorsArmed OfficesInvestigators 1Same here but different CombinationSame here but different Combination then beforeArmed Officers 3Investigators 1Armed Officers 1Investigators 14Investigators 2Armed Officers 2Armed Officers 38Investigators 3Armed Officers 3Armed Officers 32Investigators 4Armed Officers 4Investigators 21Investigators 5Armed Officers 5Armed Officers 40Investigators 6Armed Officers 6Investigators 45Investigators 7Armed Officers 7Investigators 46Investigators 8Armed Officers 8Investigators 47Investigators 9Armed Officers 9Investigators 48Investigators 10Armed Officers 10Investigators 49Investigators 11Armed Officers 11Armed Officers 93Investigators 12Armed Officers 12Armed Officers 88Investigators 13Armed Officers 13Armed Officers 91Investigators 14Armed Officers 14ECT.Investigators 15Armed Officers 15ECT.Investigators 16Armed Officers 16ECT.Investigators 17Armed Officers 17Investigators 18Armed Officers 18Investigators 19Armed Officers 19Investigators 20Armed Officers 20Investigators 21Armed Officers 21Investigators 22Armed Officers 22Investigators 23Armed Officers 23Investigators 24Armed Officers 24Investigators 25Armed Officers 25Investigators 26Armed Officers 26Investigators 27Armed Officers 27Investigators 28Armed Officers 28Investigators 29Armed Officers 29Investigators 30Armed Officers 30Investigators 31Armed Officers 31Investigators 32Armed Officers 32Investigators 33Armed Officers 33Investigators 34Armed Officers 34Investigators 35Armed Officers 35Investigators 36Armed Officers 36Investigators 37Armed Officers 37Investigators 38Armed Officers 38Investigators 39Armed Officers 39Investigators 40Armed Officers 40Investigators 41Armed Officers 41Investigators 42Armed Officers 42Investigators 43Armed Officers 43Investigators 44Armed Officers 44Investigators 45Armed Officers 45Investigators 46Armed Officers 46Investigators 47Armed Officers 47Investigators 48Armed Officers 48Investigators 49Armed Officers 49Investigators 50Armed Officers 50Investigators 51Armed Officers 51Investigators 52Armed Officers 52Investigators 53Armed Officers 53Investigators 54Armed Officers 54Investigators 55Armed Officers 55Investigators 56Armed Officers 56Investigators 57Armed Officers 57Investigators 58Armed Officers 58Investigators 59Armed Officers 59Investigators 60Armed Officers 60Investigators 61Armed Officers 61Investigators 62Armed Officers 62Investigators 63Armed Officers 63Investigators 64Armed Officers 64Investigators 65Armed Officers 65Investigators 66Armed Officers 66Investigators 67Armed Officers 67Investigators 68Armed Officers 68Investigators 69Armed Officers 69Investigators 70Armed Officers 70Investigators 71Armed Officers 71Investigators 72Armed Officers 72Investigators 73Armed Officers 73Investigators 74Armed Officers 74Investigators 75Armed Officers 75Investigators 76Armed Officers 76Investigators 77Armed Officers 77Investigators 78Armed Officers 78Investigators 79Armed Officers 79Investigators 80Armed Officers 80Investigators 81Armed Officers 81Investigators 82Armed Officers 82Investigators 83Armed Officers 83Investigators 84Armed Officers 84Investigators 85Armed Officers 85Investigators 86Armed Officers 86Investigators 87Armed Officers 87Investigators 88Armed Officers 88Investigators 89Armed Officers 89Investigators 90Armed Officers 90Investigators 91Armed Officers 91Investigators 92Armed Officers 92Investigators 93Armed Officers 93Investigators 94Armed Officers 94Investigators 95Armed Officers 95Investigators 96Armed Officers 96Investigators 97Armed Officers 97Investigators 98Armed Officers 98Investigators 99Armed Officers 99Investigators 100Armed Officers 100


----------



## Centurion4246 (Dec 28, 2022)

I am trying to upload the sheet having a issue


----------

