Using Excel 2000
Hi,
Formula column M shows the TT: Cobinationes could be made with each distribution as per C:K columns
I need VBA, which can generate 420 unique combinations if I use following distribution in cells K6:S6 distribution length is 9 and sum will be always = 7
Does it is possible to get combinations with length 7 in columns C:I, only unique = 420 the example below shown just few dummy combinations in the columns C:I
Example…
Thank you in advance
Regards,
Kishan
Hi,
Formula column M shows the TT: Cobinationes could be made with each distribution as per C:K columns
Book1 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
C | D | E | F | G | H | I | J | K | L | M | N | |||
5 | 1|1 | 1|X | X|1 | 1|2 | 2|1 | X|2 | 2|X | X|X | 2|2 | Sum | TT:Combinations | |||
6 | 2 | 1 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 7 | 420 | |||
7 | 3 | 0 | 3 | 0 | 0 | 1 | 0 | 0 | 0 | 7 | 140 | |||
8 | 1 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 140 | |||
9 | 0 | 0 | 0 | 3 | 0 | 4 | 0 | 0 | 0 | 7 | 35 | |||
10 | 0 | 0 | 5 | 0 | 2 | 0 | 0 | 0 | 0 | 7 | 21 | |||
11 | 0 | 0 | 5 | 1 | 0 | 0 | 0 | 0 | 1 | 7 | 42 | |||
12 | 0 | 1 | 2 | 2 | 1 | 1 | 0 | 0 | 0 | 7 | 1.260 | |||
13 | 0 | 1 | 2 | 3 | 0 | 1 | 0 | 0 | 0 | 7 | 420 | |||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
M6 | =SUM(C6:K6) | |
M7 | =SUM(C7:K7) | |
M8 | =SUM(C8:K8) | |
M9 | =SUM(C9:K9) | |
M10 | =SUM(C10:K10) | |
M11 | =SUM(C11:K11) | |
M12 | =SUM(C12:K12) | |
M13 | =SUM(C13:K13) | |
N6 | {=FACT(SUM(C6:K6))/PRODUCT(FACT(C6:K6))} | |
Press CTRL+SHIFT+ENTER to enter array formulas. |
I need VBA, which can generate 420 unique combinations if I use following distribution in cells K6:S6 distribution length is 9 and sum will be always = 7
Does it is possible to get combinations with length 7 in columns C:I, only unique = 420 the example below shown just few dummy combinations in the columns C:I
Example…
Book1 | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | |||
1 | |||||||||||||||||||||
2 | |||||||||||||||||||||
3 | |||||||||||||||||||||
4 | |||||||||||||||||||||
5 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | 1|1 | 1|X | X|1 | 1|2 | 2|1 | X|2 | 2|X | X|X | 2|2 | TT:Combinations | ||||
6 | 1|1 | 1|1 | 1|X | 2|1 | X|1 | X|1 | X|1 | 2 | 1 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 420 | ||||
7 | 1|1 | 1|1 | 1|X | X|1 | 2|1 | X|1 | X|1 | ||||||||||||||
8 | 1|1 | 1|1 | 1|X | X|1 | X|1 | 2|1 | X|1 | ||||||||||||||
9 | 1|1 | 1|1 | 1|X | X|1 | X|1 | X|1 | 2|1 | ||||||||||||||
10 | 1|1 | 1|1 | 2|1 | X|1 | X|1 | X|1 | 1|X | ||||||||||||||
11 | 1|1 | 1|1 | 2|1 | 1|X | X|1 | X|1 | X|1 | ||||||||||||||
12 | 1|1 | 1|1 | 2|1 | X|1 | X|1 | 1|X | X|1 | ||||||||||||||
13 | 1|1 | 1|1 | 2|1 | X|1 | 1|X | X|1 | X|1 | ||||||||||||||
14 | 1|1 | 1|1 | X|1 | X|1 | 2|1 | X|1 | 1|X | ||||||||||||||
15 | 1|1 | 1|1 | X|1 | 1|X | X|1 | 2|1 | X|1 | ||||||||||||||
16 | 1|1 | 1|1 | X|1 | X|1 | X|1 | 1|X | 2|1 | ||||||||||||||
17 | 1|1 | 1|1 | X|1 | 2|1 | 1|X | X|1 | X|1 | ||||||||||||||
18 | 1|1 | 1|1 | X|1 | X|1 | 2|1 | 1|X | X|1 | ||||||||||||||
19 | 1|1 | 1|1 | X|1 | X|1 | X|1 | 2|1 | 1|X | ||||||||||||||
20 | 1|1 | 1|1 | X|1 | 2|1 | X|1 | X|1 | 1|X | ||||||||||||||
21 | 1|1 | 1|1 | X|1 | 2|1 | X|1 | 1|X | X|1 | ||||||||||||||
22 | 1|1 | 1|1 | X|1 | 1|X | X|1 | X|1 | 2|1 | ||||||||||||||
23 | 1|1 | 1|1 | X|1 | X|1 | 1|X | X|1 | 2|1 | ||||||||||||||
24 | 1|1 | 1|1 | X|1 | 1|X | 2|1 | X|1 | X|1 | ||||||||||||||
25 | 1|1 | 1|1 | X|1 | X|1 | 1|X | 2|1 | X|1 | ||||||||||||||
26 | 1|1 | 1|X | 1|1 | X|1 | 2|1 | X|1 | X|1 | ||||||||||||||
27 | 1|1 | 1|X | 1|1 | X|1 | X|1 | X|1 | 2|1 | ||||||||||||||
28 | 1|1 | 1|X | 1|1 | 2|1 | X|1 | X|1 | X|1 | ||||||||||||||
29 | 1|1 | 1|X | 1|1 | X|1 | X|1 | 2|1 | X|1 | ||||||||||||||
30 | 1|1 | 1|X | 2|1 | X|1 | 1|1 | X|1 | X|1 | ||||||||||||||
31 | 1|1 | 1|X | 2|1 | X|1 | X|1 | 1|1 | X|1 | ||||||||||||||
32 | 1|1 | 1|X | 2|1 | X|1 | X|1 | X|1 | 1|1 | ||||||||||||||
33 | 1|1 | 1|X | 2|1 | 1|1 | X|1 | X|1 | X|1 | ||||||||||||||
Sheet2 |
Thank you in advance
Regards,
Kishan