Need to test multiple conditions at once? Combining IF with AND or OR lets you build complex logic in a single formula. Check if all conditions are true with AND, or if any condition is true with OR.
What Makes IF, AND & OR Useful
These combinations handle real-world complexity:
- Multiple requirements – Test several conditions simultaneously
- Flexible logic – Use AND for “all must be true” or OR for “any can be true”
- Complex decisions – Handle scenarios basic IF can’t solve
- Business rules – Implement approval workflows, eligibility checks, or validation
- Data quality – Flag records that meet (or fail) multiple criteria
The Core Functions
AND Syntax:
=AND(logical1, [logical2], ...)Returns TRUE only if all conditions are true.
OR Syntax:
=OR(logical1, [logical2], ...)Returns TRUE if any condition is true.
Combined with IF:
=IF(AND(...), value_if_true, value_if_false)
=IF(OR(...), value_if_true, value_if_false)Example 1: Loan Approval with AND
Approve loans only if credit score is 700+ AND income is $50,000+:
| Applicant | Credit Score | Income | Status |
|---|---|---|---|
| Alice | 720 | $65,000 | |
| Bob | 680 | $55,000 | |
| Carol | 750 | $48,000 | |
| David | 710 | $72,000 |
Formula: =IF(AND(B2>=700, C2>=50000), "Approved", "Denied")
Result in D2: Approved
Alice and David meet both requirements. Bob and Carol fail one condition each, so they’re denied.
Example 2: Discount Eligibility with OR
Give discount if customer is VIP OR order exceeds $500:
| Customer | Type | Order Amount | Discount? |
|---|---|---|---|
| John | VIP | $250 | |
| Sarah | Regular | $650 | |
| Mike | Regular | $380 | |
| Lisa | VIP | $120 |
Formula: =IF(OR(B2="VIP", C2>500), "Yes", "No")
Result in D2: Yes
John and Lisa get discounts (VIP status). Sarah gets one (order over $500). Mike gets neither.
Example 3: Performance Rating with AND
Rate “Excellent” if sales exceed $100K AND customer satisfaction is above 90%:
| Employee | Sales | Satisfaction | Rating |
|---|---|---|---|
| Tom | $125,000 | 92% | |
| Emma | $98,000 | 95% | |
| Jack | $110,000 | 88% | |
| Sophie | $135,000 | 94% |
Formula: =IF(AND(B2>100000, C2>0.9), "Excellent", "Good")
Result in D2: Excellent
Tom and Sophie meet both criteria. Emma and Jack miss one requirement each.
Example 4: Alert System with OR
Flag orders that are overdue OR exceed $10,000:
| Order | Amount | Days Late | Alert |
|---|---|---|---|
| 001 | $8,500 | 5 | |
| 002 | $12,000 | 0 | |
| 003 | $3,200 | 0 | |
| 004 | $6,800 | 12 |
Formula: =IF(OR(C2>0, B2>10000), "FLAG", "OK")
Result in D2: FLAG
Orders 001, 002, and 004 get flagged. Order 003 is fine.
Example 5: Combining AND with OR
Approve if (credit score 700+ AND income $50K+) OR existing customer:
| Applicant | Credit | Income | Existing | Status |
|---|---|---|---|---|
| Alice | 680 | $65,000 | Yes | |
| Bob | 720 | $55,000 | No | |
| Carol | 650 | $45,000 | Yes |
Formula: =IF(OR(AND(B2>=700, C2>=50000), D2="Yes"), "Approved", "Denied")
Result in D2: Approved
Alice and Carol are approved (existing customers). Bob is approved (meets credit and income). Complex but powerful.
Example 6: Grade Assignment with Multiple ANDs
Assign letter grades based on multiple test scores:
| Student | Test 1 | Test 2 | Grade |
|---|---|---|---|
| Alex | 85 | 88 | |
| Maya | 92 | 95 | |
| Chris | 78 | 82 |
Formula: =IF(AND(B2>=90, C2>=90), "A", IF(AND(B2>=80, C2>=80), "B", "C"))
Result in D2: B
Maya gets A (both 90+). Alex gets B (both 80+). Chris gets C (below 80 on one test).
Logic Comparison
| Function | Returns TRUE when | Example Use |
|---|---|---|
| AND | ALL conditions are true | Must meet every requirement |
| OR | ANY condition is true | Meets at least one requirement |
| NOT | Condition is false | Exclude specific cases |
Common Patterns
All conditions required:
=IF(AND(A2>100, B2="Yes", C2<50), "Pass", "Fail")Any condition sufficient:
=IF(OR(A2>100, B2="Yes", C2<50), "Pass", "Fail")Mixing AND with OR:
=IF(OR(AND(A2>100, B2="Yes"), C2<50), "Pass", "Fail")Tips for Complex Logic
Keep It Readable
- Break complex formulas across multiple cells if needed
- Use helper columns for intermediate calculations
- Comment your logic in nearby cells
Test Each Part
- Write AND or OR alone first to see TRUE/FALSE
- Then wrap it in IF once you’re confident
- Check edge cases
Mind the Parentheses
- AND and OR need their own parentheses
- IF needs its own parentheses
- One missing parenthesis breaks everything
Common Mistakes to Avoid
Wrong Syntax
=IF(AND(A2>50 AND B2<100), ...)is wrong=IF(AND(A2>50, B2<100), ...)is correct- Use commas, not AND/OR words inside the function
Too Many Nested IFs
- More than 3 levels gets confusing
- Consider IFS function instead
- Or use lookup tables
Forgetting Quotes
- Text needs quotes:
B2="Yes" - Numbers don’t:
A2>100
Start Using It
Find data with multiple criteria. Think about what combinations matter. Start with simple AND or OR, then wrap it in IF. Test with a few rows before copying down.
These combinations turn Excel into a decision engine.
Questions about IF, AND & OR? Need help with complex nested logic? Let’s connect.

