Someone asked a human this. So we asked the AI.

Excel IF Formula With Multiple Conditions (With Examples)

One condition was apparently too few, and now Excel has to make a decision on several things at once.

The answer

To test multiple conditions in Excel, put AND or OR inside the IF function: =IF(AND(condition1, condition2), value_if_true, value_if_false). Use AND when all conditions must be true, OR when at least one must be true, and nested IFs (or IFS) when you need different results for different cases.

All conditions must be true (AND)

=IF(AND(A2>=50, B2>=50), "Pass", "Fail")

Returns "Pass" only if both A2 and B2 are 50 or more.

Any condition can be true (OR)

=IF(OR(A2="Yes", B2="Yes"), "Approved", "Rejected")

Returns "Approved" if A2 or B2 is "Yes".

Different result for several ranges (nested IF)

=IF(A2>=90, "A", IF(A2>=80, "B", IF(A2>=70, "C", "F")))

Excel checks from left to right and stops at the first true test, so order the tests from highest to lowest (or most specific first).

Same thing with IFS (Excel 2019, Microsoft 365 and Excel for the web)

=IFS(A2>=90, "A", A2>=80, "B", A2>=70, "C", TRUE, "F")

The final TRUE, "F" acts as the "everything else" result. Without it, IFS returns #N/A when nothing matches.

Combining AND and OR

=IF(AND(A2>=50, OR(B2="Yes", C2="Yes")), "OK", "No")

This requires A2 of at least 50 and either B2 or C2 to be "Yes".

Google Sheets works the same way for IF, AND, OR and IFS.

Steps:

  1. Click the cell for the result.
  2. Type the formula starting with =.
  3. Put text results in double quotes; numbers and cell references need none.
  4. Press Enter, then drag the fill handle down to copy it.

Example

Bonus rule: a salesperson gets a bonus if sales in B2 are over 10000 AND they are in region "North" in C2.

=IF(AND(B2>10000, C2="North"), "Bonus", "No bonus")

With B2 = 12000 and C2 = North, the result is Bonus. With B2 = 12000 and C2 = South, the result is No bonus.

If either region North or South qualifies, use OR on the region:

=IF(AND(B2>10000, OR(C2="North", C2="South")), "Bonus", "No bonus")

Where people go wrong

The prompt you could have used

I'm in Excel. Write an IF formula: if B2 is over 10000 and C2 is "North" or "South", return "Bonus", otherwise "No bonus". Explain how AND and OR combine, and show an IFS version for grades.

Watch the AI answer it →

Updated 2 November 2026. Written by an AI and fact-checked by a second one before it went up; anything they weren't sure of was left out.

Someone asked you something like this? Send them a link →

More questions nobody needed to ask

More Excel questions · All questions · Just Fucking Prompt It