All possible combinations but sperate the combinations into two columns (No VBA)

andrew_milonavic

Board Regular
Joined
Nov 16, 2016
Messages
98
Hi,

Awhile ago @wideboydixon helped me and built a formula to combine all possible combinations without duplicates or reverse order duplicates.

Previous thread: https://www.mrexcel.com/forum/excel...-single-column-without-vba-2.html#post4750264

Is it possible to separate the combinations into two columns, D and E instead of just D?

ABCD
1Ant12Ant,Bear
2Bear13Ant,Cat
3Cat14Ant,Dog
4Dog15Ant,Elephant
5Elephant16Ant,Frog
6Frog17Ant,Gorilla
7Gorilla23Bear,Cat
824Bear,Dog
925Bear,Elephant
1026Bear,Frog
1127Bear,Gorilla
1234Cat,Dog
1335Cat,Elephant
1436Cat,Frog
1537Cat,Gorilla
1645Dog,Elephant
1746Dog,Frog
1847Dog,Gorilla
1956Elephant,Frog
2057Elephant,Gorilla
2167Frog,Gorilla

<thead>
</thead><tbody>
</tbody>


CellFormula
B1=IF(COUNTA(A:A)>1,1,"")
C1=IF(COUNTA(A:A)>1,2,"")
D1=IF(B1="","",INDEX(A:A,B1)&","&INDEX(A:A,C1))
B2=IF(ROW()>COUNTA(A:A)*(COUNTA(A:A)-1)/2,"",IF(C1=COUNTA(A:A),B1+1,B1))
C2=IF(ROW()>COUNTA(A:A)*(COUNTA(A:A)-1)/2,"",IF(C1=COUNTA(A:A),B2+1,C1+1))

<thead>
</thead><tbody>
</tbody>

Thanks

Andrew
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Excel 2010
ABCDE
1Ant12AntBear
2Bear13AntCat
3Cat14AntDog
4Dog15AntElephant
5Elephant16AntFrog
6Frog17AntGorilla
7Gorilla23BearCat
824BearDog
925BearElephant
1026BearFrog
1127BearGorilla
1234CatDog
1335CatElephant
1436CatFrog
1537CatGorilla
1645DogElephant
1746DogFrog
1847DogGorilla
1956ElephantFrog
2057ElephantGorilla
2167FrogGorilla
Sheet4
Cell Formulas
RangeFormula
D1=IF(B1="","",INDEX(A:A,B1))
D2=IF(B2="","",INDEX(A:A,B2))
D3=IF(B3="","",INDEX(A:A,B3))
D4=IF(B4="","",INDEX(A:A,B4))
D5=IF(B5="","",INDEX(A:A,B5))
D6=IF(B6="","",INDEX(A:A,B6))
D7=IF(B7="","",INDEX(A:A,B7))
D8=IF(B8="","",INDEX(A:A,B8))
D9=IF(B9="","",INDEX(A:A,B9))
D10=IF(B10="","",INDEX(A:A,B10))
D11=IF(B11="","",INDEX(A:A,B11))
D12=IF(B12="","",INDEX(A:A,B12))
D13=IF(B13="","",INDEX(A:A,B13))
D14=IF(B14="","",INDEX(A:A,B14))
D15=IF(B15="","",INDEX(A:A,B15))
D16=IF(B16="","",INDEX(A:A,B16))
D17=IF(B17="","",INDEX(A:A,B17))
D18=IF(B18="","",INDEX(A:A,B18))
D19=IF(B19="","",INDEX(A:A,B19))
D20=IF(B20="","",INDEX(A:A,B20))
D21=IF(B21="","",INDEX(A:A,B21))
E1=IF(B1="","",INDEX(A:A,C1))
E2=IF(B2="","",INDEX(A:A,C2))
E3=IF(B3="","",INDEX(A:A,C3))
E4=IF(B4="","",INDEX(A:A,C4))
E5=IF(B5="","",INDEX(A:A,C5))
E6=IF(B6="","",INDEX(A:A,C6))
E7=IF(B7="","",INDEX(A:A,C7))
E8=IF(B8="","",INDEX(A:A,C8))
E9=IF(B9="","",INDEX(A:A,C9))
E10=IF(B10="","",INDEX(A:A,C10))
E11=IF(B11="","",INDEX(A:A,C11))
E12=IF(B12="","",INDEX(A:A,C12))
E13=IF(B13="","",INDEX(A:A,C13))
E14=IF(B14="","",INDEX(A:A,C14))
E15=IF(B15="","",INDEX(A:A,C15))
E16=IF(B16="","",INDEX(A:A,C16))
E17=IF(B17="","",INDEX(A:A,C17))
E18=IF(B18="","",INDEX(A:A,C18))
E19=IF(B19="","",INDEX(A:A,C19))
E20=IF(B20="","",INDEX(A:A,C20))
E21=IF(B21="","",INDEX(A:A,C21))
 
Upvote 0

Forum statistics

Threads
1,215,764
Messages
6,126,751
Members
449,335
Latest member
Tanne

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