Advanced Combination Generation

Marcini

New Member
Joined
May 7, 2019
Messages
2
I wouldlike to expand a combination generator I currently use. It is for use withfantasy football (or soccer). You must select a team of a set formation,specifically 2 goalkeepers, 5 defenders, 5 midfielders and 3 forwards.


The onlysolution I currently have is to list 20-25 players and generate allcombinations. This creates a lot of waste as many of the combinations generateddo not fit the required formation so have to be discarded.



What Iwould like is a more specific solution so I would list the player options in 4columns, one column for each player positon and would receive an output of 15 columns.




It wouldbe put to use to list thousands of combinations so I think code would be betterthan formula but I’m open to all solutions. I hope that makes sense but I canexpand if not. I hope someone is able to help.


Thanks


 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
It's on the right lines but instead of 4 output columns I'm looking for 15.

Input:

Goalkeepers
Defenders
Midfielders
Forwards

<tbody>
</tbody>

Output:

GK1
GK2
D1
D2
D3
D4
D5
M1
M2
M3
M4
M5
F1
F2
F3

<tbody>
</tbody>
 
Upvote 0
"To increase the number of columns, insert columns in the middle of the table and copy the columns from the left or right to cover."

For the formula version, the VBA I think is automatic (?)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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