Unique groups of two numbers, all numbers in a unique group

dtaylor646

New Member
Joined
Jun 12, 2018
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

Though some other posts have had similar solutions, I want to pair a list of unique identifiers to others with each pairing unique for each month. April has #1 with #3 and necessarily #3 with #1 The first three pairings were manual and would like a formula to generate the other pairings for other months, where the pairings do not repeat from the previous months' pairs. Thank you for any and all help!

IdentifierAprilMayJune July
1324[formula here]
2413
3142
4231
5768
68514
75820
8675
9111012
1012911
1191210
1210119
13191415
1420136
15171613
16181517
17151816
18161719
19132018
2014197

<tbody>
</tbody>
 
The formula vs. macro logic seems similar. Make a set of possible values, randomly choose one, then repeat for the next row. If you run out of possibilities, try again from the top. For a formula, that's F9, for my macro I loop, up to 1000 times. I was a little surprised at how few times I needed to loop, even when looking at 19 columns.

Incidentally, nice formula!
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hello Marcelo, It looks like the formula is working as I individually add columns to the right. If I do not paste-value the new column before adding another, the numbers will regenerate and create new pairs of combinations. I mention this not as a criticism, but for anyone who may use the formula above for their own paired-grouping in the future.

Eric, I am new to VBA and look forward to trying your solution as well to continue to grow in that dimension. I love that in Excel there is more than one solution! Thank you all!! -Dan:biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,611
Members
449,109
Latest member
Sebas8956

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