Permutation in excel

S

Sweden

Hallo!

I´me a new member in your forum, can somebody help me to solve this
problem in excel please:

I need to make combinations with a makro or a funktion in excel as
followed:

Combinations with 7 numbers from 1 - 35 like that:

1 2 3 4 5 6 7
1 2 3 4 5 6 8
1 2 3 4 5 6 9

and so on, the last combination in this serie is:

1 2 3 4 5 6 35

Next serie:
1 2 3 4 5 7 8
1 2 3 4 5 7 9
1 2 3 4 5 7 10

And so on, the last combination in this serie is:

1 2 3 4 5 7 35

Next serie:

1 2 3 4 5 8 9
1 2 3 4 5 8 10
1 2 3 4 5 8 11

Until the last combination is:

1 30 31 32 33 34 35

Anyone who can help?
 
S

Sweden

Thank you for reply but it has with mathmatical permutation to do, no
with randomizing lotto combinations.
Do you have any idea or a link to solve this problem?

Swede
 
S

swatsp0p

Whether or not it is for Lotto use, the permutations should be the
same... give it a try!
 
S

Sweden

I thank you for your second reply!
There is big different, I tried it, it makes randomize combinations an
what I need is all combinations in a serie.
I will make it easier to understand, what I want is a code in vba t
make those combinations:

Say 7 numbers 1 - 10

1 2 3 4 5 6 7
1 2 3 4 5 6 8
1 2 3 4 5 6 9
1 2 3 4 5 6 10
1 2 3 4 5 7 8
1 2 3 4 5 7 9
1 2 3 4 5 7 10
1 2 3 4 5 8 9
1 2 3 4 5 9 10
1 2 3 4 6 7 8
1 2 3 4 6 7 9
1 2 3 4 6 7 10
1 2 3 4 6 8 9
1 2 3 4 6 8 10
1 2 3 4 7 8 9
1 2 3 4 7 8 10
1 2 3 4 7 9 10
1 2 3 4 8 9 10
1 2 3 5 6 7 8
1 2 3 5 6 7 9
1 2 3 5 6 7 10
1 2 3 5 6 8 9
1 2 3 5 6 8 10
1 2 3 5 7 8 9
1 2 3 5 7 8 10
1 2 3 5 7 9 10
1 2 3 5 8 9 10
1 2 3 6 7 8 9
1 2 3 6 7 8 10
1 2 3 6 7 9 10
1 2 3 7 8 9 10
1 2 4 5 6 7 8
1 2 4 5 6 7 9
1 2 4 5 6 7 10
1 2 4 5 6 8 9
1 2 4 5 6 8 10
1 2 4 5 6 9 10
1 2 4 5 7 8 9
1 2 4 5 7 8 10
1 2 4 5 7 9 10
1 2 4 6 7 8 9
1 2 4 6 7 8 10
1 2 4 6 7 9 10
1 2 4 6 8 9 10
1 2 4 7 8 9 10
1 2 5 6 7 8 9
1 2 5 6 7 8 10
1 2 5 6 7 9 10
1 2 5 6 8 9 10
1 2 5 7 8 9 10
1 2 6 7 8 9 10
1 3 4 5 6 7 8
1 3 4 5 6 7 9
1 3 4 5 6 7 10
1 3 4 5 6 8 9
1 3 4 5 6 8 10
1 3 4 5 6 9 10
1 3 4 5 7 8 9
1 3 4 5 7 8 10
1 3 4 5 7 9 10
1 3 4 5 8 9 10
1 4 5 6 7 8 9
1 4 5 6 7 8 10
1 4 5 6 7 9 10
1 4 5 6 8 9 10
1 4 5 7 8 9 10
1 5 6 7 8 9 1
 
D

Dana DeLouis

Until the last combination is:
1 30 31 32 33 34 35

With the first digit fixed at 1, there are
=COMBIN(34,6)
or
1,344,904
combinations. Do you wish to put all these on a spreadsheet, or perhaps
save to a file?
 
M

Max

Sweden said:
.. what I need is all combinations in a serie.

Try this link to download a past* sample file:
http://cjoint.com/?jqs01lrQRA
File: MyrnaLarson_Combination_Permutation.xls

The file contains an implementation of Myrna's code

For your case, to get 'Combinations with 7 numbers from 1 - 35"

Enter in A3:A37 the 35 numbers: 1,2,3 ...35
Enter in A2: 7
Enter in A1: C

Select A1
Click the button "ListPermutations"

(You gotta wait awhile as there's a lot of combinations to generate..)

*File is also available inside the zip pack at:
http://savefile.com/files/4153050
1_SampleFilesPack(36)_by_Max_upd_13Sep2005.zip
 
Top