IF formula help

[Closed]
Report
Posts
4
Registration date
Wednesday November 23, 2011
Status
Member
Last seen
November 28, 2011
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
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 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
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
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month