Greater, equal to or less than question

M

Mag\(\)\(\)

I need to write a formula and I am little stuck with it. I have a
requirement to write a formula which has to state the following....

Where "cell a1" is less than 16 then "less" where "cell a1" is greater that
16 BUT less than 32 then "50%" where "cell a1" is equal to or greater than
32 then "OK"

Hope this is clear and hope someone can help me as I have been stuck with
this fora while now.


Plz help


mag()()
 
T

T. Valko

You've left out 2 possible conditions:

=16 and an empty cell 0

If the cell is empty it will evaluate as 0. 0 is <16 so "Less" would be the
returned value.

You define <16 and >16 but not =16.

Try this with the first condition being <=16:

=IF(ISNUMBER(A1),IF(A1<=16,"Less",IF(A1<32,50%,"OK")),"")

If you want the 50% to be a numeric value then format the cell as
PERCENTAGE. If you want the 50% to be a TEXT value enclose it in quotes in
the formula: "50%".

Using the ISNUMBER test takes care of 2 potential problems. It takes care of
the empty cell situation and it also prevents an incorrect result if a text
entry is accidentally made in the cell.
 
S

Stan Brown

Sat, 14 Jul 2007 04:11:42 +0100 from Mag()()
I need to write a formula and I am little stuck with it. I have a
requirement to write a formula which has to state the following....

Where "cell a1" is less than 16 then "less" where "cell a1" is greater that
16 BUT less than 32 then "50%" where "cell a1" is equal to or greater than
32 then "OK"

Write it pretty much how you said it:

=if(A1<16,"less",if(A1<32,"50%","greater"))

You left out the =16 case, by the way. I lumped it in with 16-32.
 

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