Using Excel 2010
Hello,
I need VBA which can give me input option.
1st always use 1 to 7 numbers, and the sum of row must be always 7
2nd how many groups to be filled? For example my answer is fill in 5 groups
3rd how may rows to be filled? For example my answer is fill 200 rows
So the VBA generate 200 rows filling 5 groups per row which sum must be 7 for each row
Here is data sheet attached with some groups example (may group are 2, 3, 4, 5, 6) but sum of row is always 7 hope I explain it if any question please ask.
Regards,
Moti
Hello,
I need VBA which can give me input option.
1st always use 1 to 7 numbers, and the sum of row must be always 7
2nd how many groups to be filled? For example my answer is fill in 5 groups
3rd how may rows to be filled? For example my answer is fill 200 rows
So the VBA generate 200 rows filling 5 groups per row which sum must be 7 for each row
Here is data sheet attached with some groups example (may group are 2, 3, 4, 5, 6) but sum of row is always 7 hope I explain it if any question please ask.
Regards,
Moti
Excel Question.xlsm | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |||
1 | |||||||||||||||||
2 | |||||||||||||||||
3 | |||||||||||||||||
4 | Count | Count | Count | Count | Count | Count | Count | Count | Count | Count | Total | ||||||
5 | Gr1 | Gr2 | Gr3 | Gr4 | Gr5 | Gr6 | Gr7 | Gr8 | Gr9 | Groups | Always 7 | ||||||
6 | 2 | 2 | 2 | 1 | 4 | 7 | |||||||||||
7 | 2 | 2 | 1 | 2 | 4 | 7 | |||||||||||
8 | 2 | 2 | 2 | 1 | 4 | 7 | |||||||||||
9 | 1 | 1 | 1 | 1 | 3 | 5 | 7 | ||||||||||
10 | 2 | 3 | 1 | 1 | 4 | 7 | |||||||||||
11 | 2 | 1 | 1 | 1 | 1 | 1 | 6 | 7 | |||||||||
12 | 2 | 2 | 3 | 3 | 7 | ||||||||||||
13 | 2 | 2 | 1 | 1 | 1 | 5 | 7 | ||||||||||
14 | 1 | 1 | 1 | 1 | 3 | 5 | 7 | ||||||||||
15 | 2 | 1 | 1 | 3 | 4 | 7 | |||||||||||
16 | 1 | 1 | 2 | 2 | 1 | 5 | 7 | ||||||||||
17 | 2 | 3 | 2 | 3 | 7 | ||||||||||||
18 | 4 | 1 | 1 | 1 | 4 | 7 | |||||||||||
19 | 2 | 1 | 1 | 2 | 1 | 5 | 7 | ||||||||||
20 | 2 | 1 | 1 | 1 | 1 | 1 | 6 | 7 | |||||||||
21 | 2 | 1 | 2 | 1 | 1 | 5 | 7 | ||||||||||
22 | 2 | 1 | 2 | 1 | 1 | 5 | 7 | ||||||||||
23 | 3 | 1 | 1 | 1 | 1 | 5 | 7 | ||||||||||
24 | 2 | 2 | 1 | 1 | 1 | 5 | 7 | ||||||||||
25 | 6 | 1 | 2 | 7 | |||||||||||||
26 | 3 | 1 | 2 | 1 | 4 | 7 | |||||||||||
27 | 2 | 1 | 2 | 2 | 4 | 7 | |||||||||||
28 | 1 | 2 | 2 | 2 | 4 | 7 | |||||||||||
29 | 1 | 1 | 2 | 1 | 2 | 5 | 7 | ||||||||||
30 | 3 | 2 | 1 | 1 | 4 | 7 | |||||||||||
31 | 6 | 1 | 2 | 7 | |||||||||||||
32 | |||||||||||||||||
33 | |||||||||||||||||
34 | |||||||||||||||||
Hoja1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
L6:L31 | L6 | =COUNTIF(C6:K6,">0") |
M6:M31 | M6 | =SUM(C6:K6) |