Using Excel 2000
Hi,
Given example below I am using formula =ALEATORIO.ENTRE(C$3,C$5) in cell C8 copied across down to P29, column Q has sum of each rows
Conditions each column C:P use lower Num & Higher Num as per row 3 & 4, for example column C to H use num 2 & 4, column I use num 3 & 5, column J use num 1 & 3, like this so on...till Column P
Formula generate combinations as shown with any sum, but the problem is I need VBA help that can generate row only with sum 43, like Row 8, 13, 14, 19, 21
Does it can be done?
Example data.
Thank you in advance
Regards,
Kishan
Hi,
Given example below I am using formula =ALEATORIO.ENTRE(C$3,C$5) in cell C8 copied across down to P29, column Q has sum of each rows
Conditions each column C:P use lower Num & Higher Num as per row 3 & 4, for example column C to H use num 2 & 4, column I use num 3 & 5, column J use num 1 & 3, like this so on...till Column P
Formula generate combinations as shown with any sum, but the problem is I need VBA help that can generate row only with sum 43, like Row 8, 13, 14, 19, 21
Does it can be done?
Example data.
Book1 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | |||
1 | ||||||||||||||||||||
2 | ||||||||||||||||||||
3 | Lower Num | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 1 | 3 | 1 | 3 | 3 | 3 | 0 | |||||
4 | ||||||||||||||||||||
5 | Higher Num | 4 | 4 | 4 | 4 | 4 | 4 | 5 | 3 | 5 | 3 | 5 | 5 | 5 | 2 | |||||
6 | ||||||||||||||||||||
7 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C12 | C13 | C14 | Sum Row | |||||
8 | 2 | 3 | 3 | 3 | 2 | 4 | 5 | 1 | 5 | 3 | 5 | 4 | 3 | 0 | 43 | |||||
9 | 2 | 2 | 2 | 4 | 2 | 3 | 3 | 2 | 4 | 2 | 4 | 4 | 4 | 1 | 39 | |||||
10 | 4 | 3 | 4 | 3 | 2 | 3 | 5 | 3 | 4 | 2 | 5 | 5 | 4 | 2 | 49 | |||||
11 | 3 | 3 |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| 2 | 5 | 3 | 3 | 5 | 4 | 1 | 49 | |||||
27 | 4 | 3 | 2 | 2 | 3 | 4 | 3 | 2 | 5 | 3 | 3 | 5 | 5 | 0 | 44 | |||||
28 | 2 | 3 | 3 | 2 | 4 | 3 | 4 | 3 | 3 | 2 | 4 | 5 | 3 | 1 | 42 | |||||
29 | 2 | 4 | 4 | 3 | 2 | 2 | 5 | 3 | 4 | 1 | 4 | 5 | 5 | 2 | 46 | |||||
30 | ||||||||||||||||||||
31 | ||||||||||||||||||||
Sheet1 |
Thank you in advance
Regards,
Kishan
Last edited: