EXCEL & DATA ANALYSIS

Excel IF Formula with AND and OR: Examples and Guide

Learn to combine Excel IF with AND and OR for multiple conditions, status checks, grading rules and spreadsheet validation.

Student learning resource8 min read

The IF function becomes more powerful when you need to evaluate more than one condition. AND requires every listed condition to be true, while OR requires at least one condition to be true. Combining these functions helps you implement rules consistently instead of manually checking every row.

Understand IF, AND and OR

IF returns one value if a condition is true and another value if it is false. AND evaluates several conditions and returns TRUE only when all conditions are true. OR returns TRUE when one or more conditions are true.

Use AND when a rule requires every criterion to be met, such as reaching a minimum score and submitting all required work. Use OR when any one of several conditions is sufficient.

=IF(AND(B2>=70,C2="Submitted"),"Complete","Check")
=IF(OR(B2>=90,C2="Extra credit"),"Review","Standard")

Example: pass only when all requirements are met

Suppose B2 contains a score and C2 contains an assignment status. The first formula returns Complete only when the score is at least 70 and the status is Submitted. If one condition fails, it returns Check.

These thresholds are examples, not universal academic rules. Match each condition to your actual rubric, policy or business requirement.

  • AND is appropriate when every condition is required.
  • Put text values in quotation marks.
  • Use consistent labels in the source data.

Example: accept any one qualifying condition

Suppose a review should be triggered if an amount exceeds a threshold or if the status is marked Urgent. OR is a good fit because either condition should trigger the result.

Be careful with the logic: an OR formula can return TRUE more often than expected because only one condition has to be true. Test it with one row that meets each condition and one row that meets neither.

=IF(OR(D2>1000,E2="Urgent"),"Review now","Normal")

Combine AND and OR for more complex rules

You can place AND inside OR or OR inside AND, but explain the rule in plain language before writing it. Parentheses help you express which conditions belong together.

For example, mark a task for review if it is both overdue and high priority, or if its status is Blocked. This means the first two conditions must both hold, unless the task is blocked.

=IF(OR(AND(B2<TODAY(),C2="High"),D2="Blocked"),"Review","On track")

Troubleshooting logical formulas

When the result appears wrong, test each condition separately in temporary cells. Check dates stored as text, extra spaces, the exact wording of status labels and whether the formula references moved when copied to other rows.

Avoid deeply nested IF formulas when a lookup table or a more readable formula would be easier to maintain. Document business rules, especially when they affect reporting or decisions.

  • Test a true and false example for every condition.
  • Check AND versus OR against the rule in ordinary language.
  • Use absolute references for fixed thresholds.
  • Verify dates and numbers are correctly typed.
  • Give outputs specific labels that help the user act.
KEEP LEARNING

Understanding the concept is the first step.

Explore related resources or learn about subject-focused tutoring designed to help you understand the material.