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?
<thead>
</thead><tbody>
</tbody>
<thead>
</thead><tbody>
</tbody>
Thanks
Andrew
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?
A | B | C | D | |
---|---|---|---|---|
1 | Ant | 1 | 2 | Ant,Bear |
2 | Bear | 1 | 3 | Ant,Cat |
3 | Cat | 1 | 4 | Ant,Dog |
4 | Dog | 1 | 5 | Ant,Elephant |
5 | Elephant | 1 | 6 | Ant,Frog |
6 | Frog | 1 | 7 | Ant,Gorilla |
7 | Gorilla | 2 | 3 | Bear,Cat |
8 | 2 | 4 | Bear,Dog | |
9 | 2 | 5 | Bear,Elephant | |
10 | 2 | 6 | Bear,Frog | |
11 | 2 | 7 | Bear,Gorilla | |
12 | 3 | 4 | Cat,Dog | |
13 | 3 | 5 | Cat,Elephant | |
14 | 3 | 6 | Cat,Frog | |
15 | 3 | 7 | Cat,Gorilla | |
16 | 4 | 5 | Dog,Elephant | |
17 | 4 | 6 | Dog,Frog | |
18 | 4 | 7 | Dog,Gorilla | |
19 | 5 | 6 | Elephant,Frog | |
20 | 5 | 7 | Elephant,Gorilla | |
21 | 6 | 7 | Frog,Gorilla |
<thead>
</thead><tbody>
</tbody>
Cell | Formula |
---|---|
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