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

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.
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,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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