Filling the glasses of beer
Thank you, CLR,
Needless to say that my actual problem consists of more that 4 glasses,
around 10 to 15, and that your proposal becomes not practical. Thank
you anyway.
Should anyone else have any other suggestions, please let me know.
Regards
CLR wrote:
Actually, that one only works with a starting value less than an amount
needed to fill all glasses.......this one seems better as it prevents
overfilling the last glass......
=IF(B1=SMALL($A$1:$D$1,1),MAX(10,20-SMALL($A$1:$D$1,1)-SMALL($A$1:$D$1,2)-SMALL($A$1:$D$1,3)-SMALL($A$1:$D$1,4)),IF(B1=SMALL($A$1:$D$1,2),MAX(1 0,20-SMALL($A$1:$D$1,1)-SMALL($A$1:$D$1,2)-SMALL($A$1:$D$1,3)-SMALL($A$1:$D$1,4)),IF(B1=SMALL($A$1:$D$1,3),MAX(1 0,20-SMALL($A$1:$D$1,1)-SMALL($A$1:$D$1,2)-SMALL($A$1:$D$1,3)-SMALL($A$1:$D$1,4)),MIN(10,B1+20-(10-SMALL($A$1:$D$1,1))-(10-SMALL($A$1:$D$1,2))-(10-SMALL($A$1:$D$1,3))))))
Vaya con Dios,
Chuck, CABGx3
"CLR" wrote:
Here's one way...........
=IF(A1=SMALL($A$1:$D$1,1),MAX(10,20-SMALL($A$1:$D$1,1)-SMALL($A$1:$D$1,2)-SMALL($A$1:$D$1,3)-SMALL($A$1:$D$1,4)),IF(A1=SMALL($A$1:$D$1,2),MAX(1 0,20-SMALL($A$1:$D$1,1)-SMALL($A$1:$D$1,2)-SMALL($A$1:$D$1,3)-SMALL($A$1:$D$1,4)),IF(A1=SMALL($A$1:$D$1,3),MAX(1 0,20-SMALL($A$1:$D$1,1)-SMALL($A$1:$D$1,2)-SMALL($A$1:$D$1,3)-SMALL($A$1:$D$1,4)),A1+20-(10-SMALL($A$1:$D$1,1))-(10-SMALL($A$1:$D$1,2))-(10-SMALL($A$1:$D$1,3)))))
Vaya con Dios,
Chuck, CABGx3
"vsoler" wrote:
A difficult one for me!!!
A B C D
1 7 3 5 4
2 4 1 3 2
3 ? ? ? ?
I have 4 glasses of beer filled with, say 7, 3, 5 and 4 cubic
centimeters (row 1)
I RANK them from more empty to less empty (row 2, not my question)
Now, I have 20 cubic centimeters of beer to fill my glasses, starting
from the more empty and finishing in the less empty.
If the capacity of a glass is 10 cubic centimeters, what's the formula
for row 3 which will give me the beer in each glass after I pour the
beer?
Please, I'm looking for a formula that does not use any intermediate
calculations in other cells.
Want to share the beer with me?
|