IF formula help

Closed
BasilBloo Posts 4 Registration date Wednesday 23 November 2011 Status Member Last seen 28 November 2011 - 28 Nov 2011 à 23:38
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 30 Nov 2011 à 16:43
Hello,

I am trying to create a spreadsheet using Excel 2010. All the data works fine... Except for this one formula.

When entered into seperate cells in diffirent columns the formulae works, but as soon as I combine them, the last two statements fail...
I must be cancelling one statement with another - please help!

=IF(H5>0,H5*Q5,IF(OR(H5>0,O5>0,),O5*Q5,IF(E5="A",G5*Q5,IF(OR(H5="",J5>0),O5*Q5,IF(OR(J5="",M5>0),M5*Q5,IF(E5="B",P5*Q5,""))))))

Thank you!

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
30 Nov 2011 à 16:43
Your sequence of "IF" logic seems to be a bit shaky. You have
=
IF(H5>0,H5*Q5,
IF(OR(H5>0,O5>0,),O5*Q5,
IF(E5="A",G5*Q5,
IF(OR(H5="",J5>0),O5*Q5,
IF(OR(J5="",M5>0),M5*Q5,
IF(E5="B",P5*Q5,""))))))

Now if you look, at your first two if, in the 2nd if (H5>0) will never be the true due to H5>0 part, because if that ever is the occurrence, then the first IF will be executed