Bob Phillips said:
I thought about round, and came up with
D1: =MAX(ROUND($G$1*C1,0),1)
D2: =MAX(MIN($G$1-SUM($E$1:E1),ROUND($G$1*C2,0)),0)
I don't believe that works when the number of units is 6, what Jim started
with, or less.
In fact, I believe it does not work for a wide range of numbers.
Considering just the numbers <= 100: 2-6, 16-18, 26, 27, 37-40, 42, 43, 55,
65-67, 79-82, and 88-92.
----- original message -----