Get unique combinations using array formula?

shayej

New Member
Joined
Feb 4, 2013
Messages
4
Hi I have seen to many combination solutions but none of them uses array formula. Is it possible to generate unique combination (order doesn’t matter) using array formula.


Column A has list of participant, column C should give all possible unique combination.

This is what I want:
1
Amy

Amy John
3
John

Amy Charlie
4
Charlie

Amy Ian
5
Ian

John Charlie
6


John Ian
7


Charlie Ian

<tbody>
[TD="align: center"]
[/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]

</tbody>

I am trying to use Google sheet, therefore I cannot use vba or macro.

Any help will be much appreciated.

Thank you.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I found this formula which gives me what I want but it requires 2 column of list. I only have I column of list.

{=IF(ROW()-ROW($F$1)+1>COUNTA(A:A)*COUNTA(B:B),"",INDEX(A:A,INT((ROW()-ROW($F$1))/COUNTA(B:B)+1))&INDEX(B:B,MOD(ROW()-ROW($F$1),COUNTA(B:B))+1))}
 
Upvote 0
not a big fan of long formulas but try:

Given your layout A1:A4

Try in D2 and drag down

=INDEX($A$1:$A$4,SMALL(IF(ROW($A$1:$A$4)<=TRANSPOSE(ROWS($A$1:$A$4)-ROW($A$1:$A$4)),ROW($A$1:$A$4)),ROWS(D$2:D2))) & " " & INDEX($A$1:$A$4,SMALL(IF(ROW($A$1:$A$4)<=TRANSPOSE(ROWS($A$1:$A$4)-ROW($A$1:$A$4)),ROW($A$1:$A$4)),ROWS(D$2:D2))+1+INDEX(COUNTIF(D$1:D1,$A$1:$A$4&"*"),SMALL(IF(ROW($A$1:$A$4)<=TRANSPOSE(ROWS($A$1:$A$4)-ROW($A$1:$A$4)),ROW($A$1:$A$4)),ROWS(D$2:D2))))

confirm with Control Shift Enter
 
Upvote 0
Is your data in A1:A4 and are you copying the whole formula and pasting it in D2 and entering it with CSE?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

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