The values in rows 3 to 6 must be positive integers? Is there any range besides 10 to 99 for row 4 (metric B)?
Also, your percentages are rounded. For C11:C14, C13 means A = .78 D. However, C12 means C = .69 D, and C14 means A = C / .88. Perform some substitutions: .78 D = C / .88, so C = (.78) (.88) D = .6864 D . 0.6864 is close to 69%, but not exact.
If you want smallish integers which produce metrics close enough to the targets, you'd be better off with a NONSTOCHASTIC approach.
For example, define the name B referring to =ROW(INDEX($1:$1048576,1,1):INDEX($1:$1048576,99,1)). That makes B the array {1;2;3; . . . ;97;98;99}. Then in C4, enter this array formula monstrosity.
C4:
This is the smallest integer in B for which the various ratios of integers in C3:C6 rounded to 2 decimal places are effectively equal to the percentages in C11:C14.
C3:
C5:
C6:
Select C3:C6 and fill right into D3:Q6. When you do so, you'll find that P3:Q6 all show #N/A, which means there isn't an integer in 1 to 99 for P4 or Q4 which would combine with other smallish integers in the other cells in P3:Q6 which would produce rounded percentages close enough to those in P11:Q14.
However, that's why one uses defined names. Change the definition of B to =ROW(INDEX($1:$1048576,1,1):INDEX($1:$1048576,199,1)). Once you do so, P4 becomes 110 and Q4 becomes 103.
The main thing to note is that if all cells in B3:Q6 must be integers, and the percentages are rounded, so integers would produce percentages within 0.5% of the percentages shown, then this is a relatively simple linear programming problem rather than a stochastic simulation problem.
Bookmarks