'"IF" with conditions across multiple columns in Excel

My dataset looks like this:

enter image description here

I am looking for a formula to add to the column "Status" to do the following:

If Name = "A" and Project = "TT" and Number > 5, write "PASS" otherwise write "FAIL"

If Name = "A" and Project = "NN" and Number > 10, write "PASS" otherwise write "FAIL"

If Name = "B" and Project = "TT" and Number > 20, write "PASS" otherwise write "FAIL"

I struggle puting together something that works with "IF" and "OR".

Would anyone be able to offer a simple solution?



Solution 1:[1]

Breaking this into parts:

  • AND(A2="A",B2="TT",C2>5)
  • AND(A2="A",B2="NN",C2>10)
  • AND(A2="B",B2="TT",C2>20)

Then using OR:

=IF(OR(AND(A2="A",B2="TT",C2>5),AND(A2="A",B2="NN",C2>10),AND(A2="B",B2="TT",C2>20)),"PASS","FAIL")

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BigBen