• 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.

Simple logic formula that is troubling me

j_sun

Member
Hi All,

I've spent enough time struggling with what I know should be a simple task so I'm turning to the experts.


What is the best way to accomplish this:


If cell A <> "good", display value in cell A

If cell A = "good" AND cell B = "good", display "good"

If cell A = "good" AND cell B <> "good" display "bad"


I think that gives you the idea.


Thanks,

Jason
 
Assuming the only options for A and B are Good/Bad, this will work:

=IF(OR(A2<>"Good",B2="Good"),"Good","Bad")


Otherwise,

=IF(A2<>"good",A2,IF(B2="good","good","bad"))
 
J_Sun

Code:
=IF(A1<>"Good",A1,IF(AND(A1="Good", B1="Good"),"Good",IF(AND(A1="Good",B1<>"Good"),"Bad","Something else")))


edit: I actually like Lukes formula better
 
Back
Top