IF Statement
IF Statement
(OP)
I am trying to write an 'IF Statement' where I9 is the variable ranging from 0 to 5000.
R9 and S9 return a different answer depending on the figure I9 returns.
Currently if I9 is '0' R9 and S9 default to 0.20 due to the formula in R9 and S9 respectively.
If I9 is equal to 0 I want I9 to show a 0 and not the 0.20 it currently is.
The formula I currently am using is:
=IF(I9>1500,S9,R9)
R9 and S9 return a different answer depending on the figure I9 returns.
Currently if I9 is '0' R9 and S9 default to 0.20 due to the formula in R9 and S9 respectively.
If I9 is equal to 0 I want I9 to show a 0 and not the 0.20 it currently is.
The formula I currently am using is:
=IF(I9>1500,S9,R9)





RE: IF Statement
This doesn't make any sense. If I9 = 0 then I9 is 0, not 0.2.
RE: IF Statement
I am trying to write an 'IF Statement' where I9 is the variable ranging from 0 to 5000.
R9 and S9 return a different answer depending on the figure I9 returns.
Currently if I9 is '0' R9 and S9 default to 0.20 due to the formula in R9 and S9 respectively.
If I9 is equal to 0 I want X9 to show a 0 and not the 0.20 it currently is.
The formula I currently am using is:
=IF(I9>1500,S9,R9)
the formula I devised, but not seem to work:
=IF(AND(I9>0,I9<1500,R9,IF(I9>1500,S9,0)))
RE: IF Statement
=IF(I9=0,0
If I9 is not 0, you want your original IF statement to apply. Therefore, you get:
=IF(I9=0,0,IF(I9>1500,S9,R9))
RE: IF Statement
these things are easier than you think!
RE: IF Statement
=IF(AND(I9>0,I9<1500),R9,IF(I9>1500,S9,0))
I think that the number of right hand parentheses at the end of the 'IF' formula needs to be the same as the number of IF's in the formula.
Norm
RE: IF Statement
eg if(a=2,if(foo),if(bar))
Cheers
Greg Locock
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.