Use different numbers for a calculation dependent on input

  • Thread starter Thread starter Bob Zimski
  • Start date Start date
B

Bob Zimski

What I would like to do is the following for cell B1:

If A1<=250 then B1=1, if A1>250 and A1<=500 then B1=2, if A1>500 and
A1<=1000 then B1=3, if A1>1000 then "Problem".

Is this doable in a spreadsheet?

Thanks
 
Hi Bob,

Try this one.

=IF(A1<=250;1;
IF(AND(A1>250;A1<=500);2;IF(AND(A1>500;A1<=1000);3;"Problem")))

Ypou may have to change ";" to "," depending on your locale.

Wkr,

JP
 
You could use something like this


=IF(A1="","",VLOOKUP(A1,{0,1;250.1,2;500.1,3;1000.1,"Problem"},2))


If you can have number like 500.0001 etc change the 500.1 to a smaller value
still greater than 500

--


Regards,


Peo Sjoblom
 
Bob Zimski said:
What I would like to do is the following for cell B1:
If A1<=250 then B1=1, if A1>250 and A1<=500 then B1=2, if A1>500 and
A1<=1000 then B1=3, if A1>1000 then "Problem".

=IF(A1<=250,1,IF(A1<=500,2,IF(A1<=1000,3,"Problem")))
 
Back
Top