IF with AND / OR
Return one result when several conditions are all true (AND) or when any is true (OR).
The formula
Excel and Google Sheets
=IF(AND(B2>=50, C2="Yes"), "Pass", "Fail")How it works
AND(B2>=50, C2="Yes")True only when the score is at least 50 and attendance is Yes. Swap AND for OR to need just one.
"Pass", "Fail"What to show when the test is true, and when it is false.
Example
| B: Score | C: Attended | D: Result |
|---|---|---|
| 72 | Yes | Pass |
| 72 | No | Fail |
| 41 | Yes | Fail |
Tips
- Text comparisons are not case-sensitive: "yes" equals "Yes".