ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   <,> formula (https://www.excelbanter.com/excel-worksheet-functions/24039-%3C-%3E-formula.html)

Jakefoot

<,> formula
 
I am trying to create a formula that says yes when a number is greater than
23 but less than 24 and says no when a number is less than 23 or greater than
24.
I can only figure out how to do one or the other but not both. Thank you.

arno

Hi Jakefoot,
I am trying to create a formula that says yes when a number is
greater than 23 but less than 24 and says no when a number is less
than 23 or greater than
24.
I can only figure out how to do one or the other but not both. Thank
you.


=IF(AND(A1<24,A123),"yes","oh no")

arno


Don Guillett

have a look at the AND function
=if(and(a223,a2<24),1,2)

--
Don Guillett
SalesAid Software

"Jakefoot" wrote in message
...
I am trying to create a formula that says yes when a number is greater

than
23 but less than 24 and says no when a number is less than 23 or greater

than
24.
I can only figure out how to do one or the other but not both. Thank you.




Peo Sjoblom

With those conditions then 23 or 24 wouldn't return anything?
Assume that you want greater or equal to 23 and less than or equal
24 as the first condition

=IF(AND(A1=23,A1<=24),"Yes","No")

--
Regards,

Peo Sjoblom


"Jakefoot" wrote in message
...
I am trying to create a formula that says yes when a number is greater than
23 but less than 24 and says no when a number is less than 23 or greater
than
24.
I can only figure out how to do one or the other but not both. Thank you.



bj

try =if(and(number=23,number<24),"yes","no")
You might have to play with the greater than and less than criteria to get
what you want

"Jakefoot" wrote:

I am trying to create a formula that says yes when a number is greater than
23 but less than 24 and says no when a number is less than 23 or greater than
24.
I can only figure out how to do one or the other but not both. Thank you.


Harlan Grove

Peo Sjoblom wrote...
With those conditions then 23 or 24 wouldn't return anything?
Assume that you want greater or equal to 23 and less than or equal
24 as the first condition

=IF(AND(A1=23,A1<=24),"Yes","No")

....

Variation on the theme.

=, <=: =IF(ABS(x-23.5)<=0.5,"y","n")


, <: =IF(ABS(x-23.5)<0.5,"y","n")




All times are GMT +1. The time now is 10:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com