Creating groups of 6 numbers from list of 18 numbers

jag108

Active Member
Joined
May 14, 2002
Messages
433
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
OK, I have a list of numbers, all of which are random. I am trying to create a non-repeating list of numbers in grouips of 6.

I am trying to do this using VBA if possible.

Number list
3
6
10
13
14
16
17
18
23
25
26
27
29
30
31
32
34
38

The ideal output for me would be:
3, 6, 10, 13, 14, 16
17, 18, 23, 25, 26, 27
29, 30, 31, 32, 34, 38
6, 10, 13, 14, 16, 17
18, 23, 25, 26, 27, 29
30, 31, 32, 34, 38, 3
.....
so on and so forth
Loop through until all permutations are exhausted, with out duplicating any groups of 6.
Ultimately I would like all the possible permutations to be unique.

Thanks in advance
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
And what would you do with this list of 18,564 combinations? I've yet to see a good reason to list them all out. However, if you really want to do it, this topic has been broached many times. Here are a few:

https://www.mrexcel.com/forum/excel-questions/277924-combination-help.html


https://www.mrexcel.com/forum/excel-questions/957595-5-number-combinations-defined-set.html


And supposedly, there's a workbook that will do combinations of n choose m at https://app.box.com/s/b9b9fc06beb63b9562f9 although I haven't tried it out.
 
Upvote 0
Hi Eric,

I did not realize there would be that many permutations :(
I will have a look and see if I can filter out any possible duplicates.

Thanks for taking the time to respond though.

Jag
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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