if statement

P

pwoodix

Does anyone know - I have an IF statement setup asking if a formula >0, same
formula +.01, same formula. (the formula figures an hourly rate based on a
set gross amount taking into account reg and overtime hourly rates and
returns an hourly rate based on a predetermined gross $ amount.) The idea is
if the formula returnsa 0 or a positive gretaer than 0 then ADD +.01 (penny)
else leave the result alone.) The problem is that if the answer is a negative
# such as (.05) exxcel seems to treat that as being greater than 0 and the
penny extra! How can this be? Any idea how to fix this please? (the formula
looks like this - =IF($J555/($E555+($G555*1.5))
 
B

Bob Phillips

I cannot reproduce your results, it always takes the false path if it is
negative.

What values in E5,G5 and J5 give you that result?
 
P

pwoodix

Thanks for the help. I finally figured it out late last night! I had
embedded ( ) incorrect and also one of the values comparing was wrong!
 
D

Duke Carey

Just for the heck of it - here's a slightly shorter version of your formula

=$J555/($E555+($G555*1.5))+IF($J555/($E555+($G555*1.5))>=0,0.01,0)
 
Top