Create list of all pair combinations

Nick

Board Regular
Joined
Jul 11, 2002
Messages
70
Hello,

I have the following strored in separate cells in cells and need to create a list of pair combinations (42 pairs).

JMAT.L
CAR.L
TET.L
CRDA.L
VCT.L
DLTA.L
ELM.L

For example, for the first code all combinations would be the following?

JMAT.L CAR.L
JMAT.L TET.L
JMAT.L CRDA.L
JMAT.L VCT.L
JMAT.L DLTA.L
JMAT.L ELM.L

then I want to do the same for the next code in the list "CAR.L". Ideally I would like the combintion to be placed in seperate cells, e.g first part of the pair in column A (e.g JMAT.L in the example apve) and next part of the pair in Column B (CAR.L, TET.L etc).

ALso I need to do this with lists of different sizes (7 codes in the above) so would be good if any solution would be dynamic allowing different number of codes.

Hope someone can help,

Thanks,

Nick
 
@pgc01,

How do I get "unique" combinations from the Permutations_2 code?

Say I have a set {a,b,c,d,e} of 5 elements and i want to select 2 (up 5) as my p. And, I want only unique combinatios, ie. if AB is a first, then BA should not show up as it AB=BA. Essentially I want to see only the unique combinations.

Thanks.
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
@pgc01,

How do I get "unique" combinations from the Permutations_2 code?

Say I have a set {a,b,c,d,e} of 5 elements and i want to select 2 (up 5) as my p. And, I want only unique combinatios, ie. if AB is a first, then BA should not show up as it AB=BA. Essentially I want to see only the unique combinations.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,832
Messages
6,181,234
Members
453,026
Latest member
cknader

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