Complete Guide to IF with Multiple Conditions: AND, OR, IFS, XLOOKUP, and FILTER Examples

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 IDRegionProductQuantityAmountStatusScoreOrder Date
O-001DomesticA345000Complete922025-08-01
O-002InternationalB120000In Progress812025-08-03
O-003DomesticB6120000Complete762025-09-10
O-004DomesticC235000On Hold652025-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

IssueCauseSolution
#VALUE!/#N/ABlank cells or mixed data typesWrap with IFERROR/IFNA and standardize data types.
Too many parenthesesOveruse of nested IF formulasReplace with IFS/SWITCH/LET.
Slow calculationDuplicate calculationsEliminate duplicates with LET and use table references.
Cannot return multiple rowsIF returns a single valueUse FILTER.
Left/right lookup limitationsVLOOKUP limitationsSwitch to XLOOKUP.

Related Articles

Thanks for reading. If you found this helpful, please bookmark or subscribe!

Leave a Reply

Your email address will not be published. Required fields are marked *