Greater than and less than

Closed
Report
-
Posts
122
Registration date
Tuesday August 31, 2010
Status
Contributor
Last seen
June 20, 2016
-
Hello, i need help.

A4 is the input
i need to make it so that if A4 is greater than 1 and less than 100 it will display "centimeters" . Any suggestions??



1 reply

Posts
122
Registration date
Tuesday August 31, 2010
Status
Contributor
Last seen
June 20, 2016
24
You cannot put the result, "Centimeters", in the same cell as the source.
The formula must go in another cell.

Either of these will do what you want:
=IF(AND(A4>1,A4<100),"Centimeters","")
=IF(A4>1,IF(A4<100,"Centimeters",""),"")


The "" can be replaced with another value if the criteria is not met.
e.g.
=IF(AND(A4>1,A4<100),"Centimeters","NOT Centimeters")
or
=IF(A4>1,IF(A4<100,"Centimeters",">100"),"<1")