Originally Posted by
SCLai
I believe.. it is becasue all of them fall through those conditions.
Looking at the column O,P & Q, some those formula returns "" instead of "0", so it is just going to fall through all those conditions and end up as "".
Please try using the following formula and see if it works:
=IF(AND(O5="",P5="",Q5=""),"",IF(AND(O5<0,OR(P5=0,P5=""),OR(Q5=0,Q5="")),O5*D5,IF(AND(OR(O5=0,O5=""),P5>0,Q5>0),P5+Q5,IF(AND(OR(O5=0,O5=""), P5>0,OR(Q5=0,Q5="")),P5*D5,""))))
Hope it helps!
SC
EDIT: But please take note that what I have done was to change.. for example.. O5=0 into OR(O5=0,O5=""). Overall, the formula essencially means:
IF cells O,P,Q, have no values, then ""
IF cell O<0, and cells P and Q="" or cells P and Q = 0, then cell O multiplied by cell D.
IF cell O=0 or O="", and cells P and Q>0, then cell P plus cell Q.
IF cell O=0 or O="", and cell P>0, and cell Q=0 or Q="", then cell P multiplied by cell D.
Do notice that compared to the conditions you have stated:
Your formula for O,P & Q returns "" instead of "0", thus the blanks.
So please do check your requirements vs the new formula and see if conflicts with your interest!
Hope this helps
SC
Bookmarks