nesting if function question

B

BRC

I am trying to use if function to set number in current cell to be
between 0 and .09 depending on adjacent cell. E. g. value for B1 [if
A1>.09,09,A1] but I also want to test for the condition [If A1<0,0,A1]
Can anyone direct me to code that can do this? Thanks in advance for
any suggestions
BRC
 
M

Mangus Pyke

I am trying to use if function to set number in current cell to be
between 0 and .09 depending on adjacent cell. E. g. value for B1 [if
A1>.09,09,A1] but I also want to test for the condition [If A1<0,0,A1]
Can anyone direct me to code that can do this? Thanks in advance for
any suggestions
BRC


=IF(A1<0,0,IF(A1>.09,.09,A1))

MP-
 
R

Ron Rosenfeld

I am trying to use if function to set number in current cell to be
between 0 and .09 depending on adjacent cell. E. g. value for B1 [if
A1>.09,09,A1] but I also want to test for the condition [If A1<0,0,A1]
Can anyone direct me to code that can do this? Thanks in advance for
any suggestions
BRC

=MIN(MAX(A1,0),0.9)
--ron
 
Top