# Archive of Mr Excel Message Board

Back to Dates in Excel archive index
Back to archive home

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

## Re: Less/Greater Than formula

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

## Re: Less/Greater Than formula

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

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

## Re: Less/Greater Than formula

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

Thanks Guys they both work.

## How about... (Re: Less/Greater Than formula)

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

=======

## Re: How about... (Re: Less/Greater Than formula)

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

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

Juan Pablo

## Re: How about... (Re: Less/Greater Than formula)

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

======

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

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

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

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

This archive is from the original message board at www.MrExcel.com.