IF question...

M

mailrail

I need a formula which will allow me to accept a number if it falls within a
certain range. For instance, I want the cell to recognize the number in the
cell if it falls between 1 and 10. Otherwise, I want the cell to return a 0
value. Anybody?
 
M

Myrna Larson

The result you want when A1 is between 1 and 10. See Help if you need more
inforamtion.
 
M

mailrail

Maybe I should rephrase it a little...

I'm REFERENCING another cell and would like it to return (or accept) the
value of THAT cell if it falls between 1 and 10. Otherwise, I want it to
return a value of 0.
 
B

BenjieLop

Modifying Myrna's suggestion, your formula will now look like this :

=IF(AND(A1>=1,A1<=10),X1,0)

where X1 is the other cell that contains the value that you wan
referenced when A1 is between 1 and 10.
 
F

Frank Kabel

Hi
if you're referencing cell A1 use
=IF(AND(A1>=1,A1>=10),A1,0)

or a little bit shorter
=A1*(A1>=1)*(A1<=10)
 
Top