math - Excel - Multiply Until Total Reached -


i want multiply x*y until x>=20, multiply z value , have results displayed 2 values, multiple , multiple*z

the question behind formula is, how many boxes of x capacity need have total capacity of 20 liters , how cost.

x = volume of bottle y = number of bottles in box z = price per box 

this done hand, i've been playing (with little effect) in excel while , solution.

i hope makes sense

i rather think formula provided @jeeped for:

i want multiply x*y until x>=20, multiply z value , have results displayed 2 values, multiple , multiple*z

label 2 arrays 1 20 columns , rows shown, populate v1 price per box , in b2:

=if(and($a2*b$1>20,a2>=20),"",$a2*b$1)   

and in x2:

=if(b2="","",$v$1*b2)   

with both formulae copied across 19 columns , 2 sets of 20 formulae copied down 19 rows. result should similar to:

enter image description here


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -