choose the right volume

  • Thread starter Thread starter farsta_online
  • Start date Start date
F

farsta_online

I need enormous help from you
In my excel workbook I have 3 alternatives for volume (100 ml, 250 ml,
500ml)
The strength = D3/volume and ahs to be between 1,5 and 25 i.e. 1.5 <
D3/volume < 25
What I want trying to do is:
1. take 100 ml. If the condition (1.5 < D3/volume < 25) is true than
set D6 = 100 ml.
2. When False take 250 ml. If the condition (1.5 < D3/volume < 25) is
true than set D6 = 250ml
3. When 2 is False take 500 ml. If the condition (1.5 < D3/volume <
25) is right than set D6 = 500ml
My Q´s are
a) can this be done at al?
b) if yes – how?

Any help we'll be appreciated
With regards
Peter
 
Try this in cell D6...

=IF(AND(D3/100>1.5,D3/100<25),100,IF(AND(D3/250>1.5,D3/250<25),250,IF(AND(D3/500>1.5,D3/500<25),500,"Error")))
 
Assume the volumn is in in D6

=if(and(D3/100>1.5,D3/100<25),"100ml",if(and(D3/250>1.5,D3/250<25),"250ml",i
f(And(D3/500<1.5,D3/500<25),"250ml","limits exceeded")))
 
Here is another way:

=IF(D3<150,"Limits",VLOOKUP(D3,{150,100;2500,250;6250,500;12500,"Limits"},2,
TRUE))
 
Reviewing this formula see there is a typo in that the 2nd 250ml should have
been 500ml

=if(and(D3/100>1.5,D3/100<25),100,if(and(D3/250>1.5,D3/250<25),250,if(And(D3
/500<1.5,D3/500<25),500,"limits exceeded")))

on the offhand chance the OP can't recognize that for their regional setting
they might need to change the period to a comma
=if(and(D3/100>1,5,D3/100<25),100,if(and(D3/250>1,5,D3/250<25),250,if(And(D3
/500<1,5,D3/500<25),500,"limits exceeded")))

also changed the results to be numbers rather than text strings as a later
posting appears to want to use them in a calculation.

also, if the formula appear on 2 lines in the email, it is because of word
wrap and the formulas should all be on one line.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top