How to Use IF with AND & OR

Mastering IF with AND/OR in Excel

Most people overcomplicate IF statements—here’s the clean way.

By Sharanmeet Singh
Tags:ExcelIFANDORLogic

Excel Formula Generator

Generate Excel formulas for data analysis and calculations

Try Generator

IF with AND/OR in Excel

The IF function is the backbone of logical formulas. But when you combine it with AND and OR, things can get confusing.


IF with AND

Check if multiple conditions are true:

=IF(AND(A2>50, B2="Yes"), "Pass", "Fail")
  • Returns Pass if score is greater than 50 and B2 equals Yes.

IF with OR

Check if at least one condition is true:

=IF(OR(A2>50, B2="Yes"), "Pass", "Fail")
  • Returns Pass if either condition is true.

Nested IF Example

=IF(A2>80, "High", IF(A2>50, "Medium", "Low"))

Common Mistakes

  • Forgetting extra brackets in AND/OR
  • Overusing nested IF instead of IFS (in newer Excel)

Pro tip: For complex logic, use IFS or SWITCH to simplify formulas.