If and (and) formula to allow a zero answer

I

inthestands

I am trying to use the following formula
=IF(AND(A2>1.31,A2<.95)"","",ROUND(B2,2))

The response I am trying to get is if A2 Is greater than 1.31 and less than
..95 then give me no answer in B2, but if A2 falls within this parameter, then
round B2 to two decimals into C2. What am I doing wrong?

thanks in advance,
 
T

Trevor Shuttleworth

I suspect this is what you want:

=IF(OR(A2>1.31,A2<.95),"",ROUND(B2,2))

or

=IF(OR(A2>.95,A2<1.31),"",ROUND(B2,2))

A2 cannot be greater than 1.31 AND less than 0.95. You can have a value
less than 1.31 AND greater than 0.95. And you can have a value that is
greater than 1.31 OR less than 0.95.

Regards

Trevor
 
T

Trevor Shuttleworth

Sorry

the second formula should have been:

=IF(AND(A2>.95,A2<1.31),"",ROUND(B2,2))


Regards

Trevor
 
K

Ken Wright

Because A2 can NEVER be greater than 1.31 AND less than 0.95. I think you are
looking for OR:-

In cell C2

=IF(OR(A2>1.31,A2<.95),"",ROUND(B2,2))

However, this only sorts out cell C2, I don't know what you have/want in B2, so
I'll guess at something like:-

In cell B2

=IF(OR(A2>1.31,A2<.95),"",Your_Current_Formula_In_B2)
 
K

K.S.Warrier

hi,
I think you may require the following
In b2 put the formula as =if(and(a2>1.31,a2<.95),"",round(a2,2))
You have shown one more "" before "" in the above.Please try.
K.S.Warrier
 
K

Ken Wright

LOL - Take a look at what you just put in there, and then think about how those
two conditions could ever both be TRUE at the same time, which is the whole
point of the AND function. :)
 

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