Split numbers in 7 positions and make all possible sets adding 0 in it</SPAN></SPAN>
Hello,</SPAN></SPAN>
I need to produce all possible set adding 0 in to given numbers (spiting in to 7 positions)</SPAN></SPAN>
Which finally sum should be = 7 for each of lines</SPAN></SPAN>
Here are the 16 lines from which I need to make all sets in the 7 positions adding the 0 it to it example sheet 1</SPAN></SPAN>
Example if I use only 7 codes should create lines as shown in the example below</SPAN></SPAN>
Example if I use only 6 & 1 codes should create lines as shown in the example below</SPAN></SPAN>
And same way I need code could be generate for each of set is shown in the sheet1 through A:P as the used in the range A4:A9</SPAN></SPAN>
Thank you all</SPAN></SPAN>
Excel 2000</SPAN></SPAN>
Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
Hello,</SPAN></SPAN>
I need to produce all possible set adding 0 in to given numbers (spiting in to 7 positions)</SPAN></SPAN>
Which finally sum should be = 7 for each of lines</SPAN></SPAN>
Here are the 16 lines from which I need to make all sets in the 7 positions adding the 0 it to it example sheet 1</SPAN></SPAN>
Book1 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |||
1 | ||||||||||||||||||
2 | ||||||||||||||||||
3 | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | Total Num | ||
4 | 7 | 6 | 5 | 5 | 4 | 4 | 4 | 3 | 3 | 3 | 3 | 2 | 2 | 2 | 2 | 2 | ||
5 | 1 | 1 | 2 | 1 | 2 | 3 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 5 | |||
6 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||
7 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||
8 | 1 | 1 | 1 | |||||||||||||||
9 | 1 | |||||||||||||||||
Sheet1 |
Example if I use only 7 codes should create lines as shown in the example below</SPAN></SPAN>
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | ||||||||||||
2 | ||||||||||||
3 | Total Num | n1 | n2 | n3 | n4 | n5 | n6 | n7 | Sum | |||
4 | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 7 | |||
5 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | ||||
6 | 0 | 0 | 0 | 0 | 7 | 0 | 0 | 7 | ||||
7 | 0 | 0 | 0 | 7 | 0 | 0 | 0 | 7 | ||||
8 | 0 | 0 | 7 | 0 | 0 | 0 | 0 | 7 | ||||
9 | 0 | 7 | 0 | 0 | 0 | 0 | 0 | 7 | ||||
10 | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | ||||
Sheet2 |
Example if I use only 6 & 1 codes should create lines as shown in the example below</SPAN></SPAN>
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | ||||||||||||
2 | ||||||||||||
3 | Total Num | n1 | n2 | n3 | n4 | n5 | n6 | n7 | Sum | |||
4 | 6 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 7 | |||
5 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 6 | 7 | |||
6 | 0 | 0 | 0 | 0 | 6 | 0 | 1 | 7 | ||||
7 | 0 | 0 | 0 | 0 | 6 | 1 | 0 | 7 | ||||
8 | 0 | 0 | 0 | 0 | 1 | 0 | 6 | 7 | ||||
9 | 0 | 0 | 0 | 0 | 1 | 6 | 0 | 7 | ||||
10 | 0 | 0 | 0 | 6 | 0 | 0 | 1 | 7 | ||||
11 | 0 | 0 | 0 | 6 | 0 | 1 | 0 | 7 | ||||
12 | 0 | 0 | 0 | 6 | 1 | 0 | 0 | 7 | ||||
13 | 0 | 0 | 0 | 1 | 0 | 0 | 6 | 7 | ||||
14 | 0 | 0 | 0 | 1 | 0 | 6 | 0 | 7 | ||||
15 | 0 | 0 | 0 | 1 | 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| 7 | ||||
42 | 1 | 0 | 0 | 0 | 6 | 0 | 0 | 7 | ||||
43 | 1 | 0 | 0 | 6 | 0 | 0 | 0 | 7 | ||||
44 | 1 | 0 | 6 | 0 | 0 | 0 | 0 | 7 | ||||
45 | 1 | 6 | 0 | 0 | 0 | 0 | 0 | 7 | ||||
Sheet3 |
And same way I need code could be generate for each of set is shown in the sheet1 through A:P as the used in the range A4:A9</SPAN></SPAN>
Thank you all</SPAN></SPAN>
Excel 2000</SPAN></SPAN>
Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
Last edited: