Less/Greater Than formula


Posted by Andrew on November 08, 2001 8:21 AM

I need my formula to return a value in C1 where A1-B1 is greater than 30 but less than 60. I am having problems putting the <> signs in the right place.
Below is how I thought it should be but it doesn't work.
=IF(A1-B1 >30<60 , C1, "False")

Posted by Barrie Davidson on November 08, 2001 8:25 AM

Try

=IF(AND(A1-B1>30=TRUE,A1-B1<60=TRUE), C1, "False")

BarrieBarrie Davidson

Posted by IML on November 08, 2001 8:25 AM

You could try
=IF(AND(A1-B1>30,A1-B1<60),C1)

Posted by Andrew on November 08, 2001 8:36 AM

Thanks Guys they both work.

Posted by Aladin Akyurek on November 08, 2001 8:55 AM

being also introduced [ Barrie & Ian I'm sure wouldn't mind ] to the Boolean AND (that is, *) as in

=(A1-B1>30)*(A1-B1<60)

It will result either in 1 (same as TRUE) or in 0 (same as FALSE)?

Aladin

=======

Posted by Juan Pablo on November 08, 2001 9:09 AM

I would add to this

=(A1-B1>30)*(A1-B1<60)*C1

Juan Pablo

Posted by Aladin Akyurek on November 08, 2001 9:30 AM

*C1

I declined doing that after re-reading "I need my formula to return a value in C1".

Aladin

======

Posted by Juan Pablo on November 08, 2001 9:42 AM

Oops, didn't read that part... (NT)

*C1



Posted by Mark W. on November 08, 2001 1:45 PM

Assuming, of course, that C1 is numeric (nt)

*C1