• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using either in excel formula

Badru Mugerwa

New Member
My name is Badru, I wish to ask for your assistance with an excel formula.

I wish to write an excel formula which Returns "YES" in cell F1 If the sum of cells A2:C2 is greater than 0 AND either D1 or E1 is greater than 0.

I will appreciate so much your assistance.

Badru
 
=IF(AND(SUM(A2:C2)>0,OR(D1>0,E1>0)),"yes","no")
The above formula will give wrong result, if D1 or E1 is a "Text Value".

Excel consider "Text Value" = non-blank,

so…...D1 enter : "A" …...=D1>0, will return TRUE.

formula modified as in :

=IF(AND(SUM(A2:C2)>0,OR(N(D1)>0,N(E1)>0)),"Yes","No")

or,

=IF((SUM(A2:C2)>0)*((N(D1)>0)+(N(E1)>0)),"Yes","No")

Regards
Bosco
 
Back
Top