
IF with Multiple Conditions: Everything You Need in One Guide (AND/OR/IFS with XLOOKUP/FILTER)
IF with multiple conditions is one of the most common challenges when combining AND/OR and branching based on text, numbers, and dates. This guide is organized as copy-and-paste formulas → principles → alternatives and optimization → troubleshooting, so even beginners can apply it immediately at work.
Quick Fix
=IF(AND(A2="Complete", B2>=90), "Pass", "Review")
=IF(OR(C2="Urgent", D2>1000000), "OK", "Pending")
=IFS(E2>=90,"A", E2>=80,"B", E2>=70,"C", TRUE,"D")
=IF(AND(F2="Domestic", G2>=50000), "Free Shipping", "Paid")
=IFERROR(IF(AND(H2<>"", I2<>""), IF(H2>I2,"Increase","Decrease"), ""), "")
=XLOOKUP(1, (Product=K2)*(Region=L2), Price)
Why Is It Confusing? (Concepts and Principles)
Logical Operations and TRUE/FALSE
Use the result (TRUE/FALSE) of AND/OR/NOT in IF(logical_test, value_if_true, value_if_false).
Nested IF vs. IFS vs. SWITCH
- Nested IF: Readability declines when there are three or more outcomes.
- IFS: Evaluates sequentially from top to bottom, making it useful for grade and range classifications.
- SWITCH: Branches among multiple possible values for a single expression.
Practical Examples (Sample Data and Formulas)
| Order ID | Region | Product | Quantity | Amount | Status | Score | Order Date |
|---|---|---|---|---|---|---|---|
| O-001 | Domestic | A | 3 | 45000 | Complete | 92 | 2025-08-01 |
| O-002 | International | B | 1 | 20000 | In Progress | 81 | 2025-08-03 |
| O-003 | Domestic | B | 6 | 120000 | Complete | 76 | 2025-09-10 |
| O-004 | Domestic | C | 2 | 35000 | On Hold | 65 | 2025-09-21 |
Domestic + Amount ≥ 50,000 ⇒ Free Shipping
=IF(AND(B2="Domestic", E2>=50000), "Free Shipping", "Paid")
Urgent (OR) or High-Value Order ⇒ Priority Processing
=IF(OR(G2="Urgent", E2>1000000), "Priority", "Standard")
Grade by Score (IFS Recommended)
=IFS(F2>=90,"A", F2>=80,"B", F2>=70,"C", TRUE,"D")
Date Branching (Ship Monday for Weekend Orders)
=IF(OR(WEEKDAY(H2,2)=6, WEEKDAY(H2,2)=7), "Ship Monday", "Same or Next Day")
Multiple-Criteria Lookup (XLOOKUP)
=XLOOKUP(1, (tblPrice[Product]=C2)*(tblPrice[Region]=B2), tblPrice[Price])
Multiple Results (FILTER)
=FILTER(A2:H5, B2:B5="Domestic", "None")
Alternatives, Optimization, and Notes
- Use COUNTIFS/SUMIFS to reduce IF formulas and improve readability and speed.
- Use LET to assign repeated references and calculations to variables.
- When possible, replace multiple-criteria lookups with XLOOKUP/FILTER.
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| #VALUE!/#N/A | Blank cells or mixed data types | Wrap with IFERROR/IFNA and standardize data types. |
| Too many parentheses | Overuse of nested IF formulas | Replace with IFS/SWITCH/LET. |
| Slow calculation | Duplicate calculations | Eliminate duplicates with LET and use table references. |
| Cannot return multiple rows | IF returns a single value | Use FILTER. |
| Left/right lookup limitations | VLOOKUP limitations | Switch to XLOOKUP. |
Related Articles
- Complete Guide to XLOOKUP with Multiple Criteria
- Create Automated Reports with FILTER
- Excel Table Basics and Named Ranges
- Create a Selection UI with Data Validation Lists
- Complete Guide to VLOOKUP Errors and IFERROR
Thanks for reading. If you found this helpful, please bookmark or subscribe!