Exclusive combination for 3 rows

cbprado

New Member
Joined
Oct 26, 2018
Messages
10
Hello,

Looking for a formula to generate all possible UNIQUE combination of the contents of 3 rows. I want to avoid results with the same content in different positions (such as aac, caa, aca should be appear only once, regardless of which)

Row1 Row2 Row3
a a a
b b b
c c c


anyone?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Given your 3 row example -- what output would you expect (please provide) from the formula?
 
Upvote 0
is that what you want?

result
a a a
a a b
a a c
a b a
a b b
a b c
a c a
a c b
a c c
b a a
b a b
b a c
b b a
b b b
b b c
b c a
b c b
b c c
c a a
c a b
c a c
c b a
c b b
c b c
c c a
c c b
c c c
 
Upvote 0
This is pretty much it, which I achieved with iferror.. what I need now is that the results supress combinations that are the same, but in different positions. Tha t to say that for the results below for instance, aac, aca, caa should appear only once (regardless of each one it is).
Imagine rolling 3 dices, if I get 1 2 1 or 2 1 1 or 1 1 2 in practical terms it´s the same result. this is where I need to get to ...

is that what you want?

result
a a a
a a b
a a c
a b a
a b b
a b c
a c a
a c b
a c c
b a a
b a b
b a c
b b a
b b b
b b c
b c a
b c b
b c c
c a a
c a b
c a c
c b a
c b b
c b c
c c a
c c b
c c c

<tbody>
</tbody>
 
Upvote 0
faster will be manually:

abc
aaa
bbb
ccc
abb
acc
baa
bcc
caa
cbb
 
Last edited:
Upvote 0
if there is no problem with PowerQuery here is an example excel file

Column1Column1Column1Sorted
aaaa, a, a
bbba, a, b
ccca, a, c
a, b, b
a, b, c
a, c, c
b, b, b
b, b, c
b, c, c
c, c, c
 
Last edited:
Upvote 0
Great aproach, thank you!

if there is no problem with PowerQuery here is an example excel file

[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Column1[/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Column1[/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Column1[/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Sorted[/COLOR]
a
a
a
a, a, a
b
b
b
a, a, b
c
c
c
a, a, c
a, b, b
a, b, c
a, c, c
b, b, b
b, b, c
b, c, c
c, c, c

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,168
Messages
6,123,408
Members
449,098
Latest member
ArturS75

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