I've got a question with regards to combinations, which is: I need to create combinations (permutations) for the content in two columns, but I only want combinations specific to unique items in Column A (and the matching data in Column B). Here's an example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]1234[/TD]
[TD]ABC0[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]ABC1[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]ABC2[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]ABC3[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]XYZ1[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]XYZ2[/TD]
[/TR]
</tbody>[/TABLE]
I want to pull so I get the following:
1234 ABC0
1234 ABC1
1234 ABC2
1234 ABC3
5678 XYZ1
5678 XYZ2
And not:
1234 ABC0
1234 ABC1
1234 ABC2
1234 ABC3
1234 XYZ1
1234 XYZ2
5678 ABC0
5678 ABC1
5678 ABC2 ...
I have thousands of rows of info, so it would be too time-consuming to break out all the unique values in column A. The formula I'm using is:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]=IF(ROW()-ROW($F$2)+1>COUNTA(A:A)*COUNTA(B:B),"",INDEX(A:A,INT((ROW()-ROW($F$2))/COUNTA(B:B)+1))&INDEX(B:B,MOD(ROW()-ROW($F$2),COUNTA(B:B))+1))[/TD]
[/TR]
</tbody>[/TABLE]
... As always, thanks! You fine people are lifesavers. :D
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]1234[/TD]
[TD]ABC0[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]ABC1[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]ABC2[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]ABC3[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]XYZ1[/TD]
[/TR]
[TR]
[TD]5678[/TD]
[TD]XYZ2[/TD]
[/TR]
</tbody>[/TABLE]
I want to pull so I get the following:
1234 ABC0
1234 ABC1
1234 ABC2
1234 ABC3
5678 XYZ1
5678 XYZ2
And not:
1234 ABC0
1234 ABC1
1234 ABC2
1234 ABC3
1234 XYZ1
1234 XYZ2
5678 ABC0
5678 ABC1
5678 ABC2 ...
I have thousands of rows of info, so it would be too time-consuming to break out all the unique values in column A. The formula I'm using is:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]=IF(ROW()-ROW($F$2)+1>COUNTA(A:A)*COUNTA(B:B),"",INDEX(A:A,INT((ROW()-ROW($F$2))/COUNTA(B:B)+1))&INDEX(B:B,MOD(ROW()-ROW($F$2),COUNTA(B:B))+1))[/TD]
[/TR]
</tbody>[/TABLE]
... As always, thanks! You fine people are lifesavers. :D