Use different numbers for a calculation dependent on input

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
 
J

JP Ronse

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
 
P

Peo Sjoblom

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
 
J

Joe User

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")))
 

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

Top