IF With Multiple Conditions in Excel
By ExcelReady TeamUpdated 6 min read
The short answer
Put AND or OR inside the IF test. =IF(AND(B2>=50000,D2>=2),"Bonus","No bonus") needs every condition to be true; =IF(OR(B2>=70000,D2>=4),"Yes","No") needs just one. For three or more possible results, nest IFs or use IFS, testing the strictest condition first. AND, OR and IF work in every version of Excel; IFS needs Excel 2019 or later.
Key takeaways
- AND(test1, test2) is TRUE only when every test is true. OR(test1, test2) is TRUE when at least one is.
- Put AND or OR inside the first argument of IF: =IF(AND(...),value_if_true,value_if_false).
- For three or more results, nest IFs or use IFS (Excel 2019 or later), with the strictest test first.
- You can mix them: =IF(AND(OR(C2="North",C2="East"),B2>=55000),"Yes","No").
- Excel has no 'AND' keyword between tests and can't read 40000<B2<60000. Use AND(B2>40000,B2<60000).
On this page+
- Which formula do you need?
- IF with AND: all conditions must be true
- IF with OR: any condition can be true
- IF with NOT: when a condition must be false
- Combining AND and OR in one IF
- Nested IF and IFS: more than two results
- Multiple conditions with text and dates
- Common mistakes with multiple conditions
- Practise it
To use IF with multiple conditions in Excel, put AND or OR inside the IF test: AND when every condition must be true, OR when any one is enough. When you need three or more different results, such as Gold, Silver and Bronze, use a nested IF or the IFS function. This guide walks through each pattern on one small sales table, with the exact formulas and results.
All the examples use this table in A1:D7:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Sales | Region | Years |
| 2 | Aisha | 62000 | North | 3 |
| 3 | Ben | 48000 | South | 5 |
| 4 | Carla | 75000 | North | 1 |
| 5 | Dev | 55000 | East | 2 |
| 6 | Elena | 39000 | South | 1 |
| 7 | Femi | 81000 | East | 4 |
Which formula do you need?#
The right formula depends on how the conditions combine and how many results you want:
| You want... | Use | Example |
|---|---|---|
| Two results, every condition true | IF + AND | =IF(AND(B2>=50000,D2>=2),"Bonus","No bonus") |
| Two results, any condition true | IF + OR | =IF(OR(B2>=70000,D2>=4),"Yes","No") |
| Two results, condition must be false | IF + NOT or <> | =IF(C2<>"South","Yes","No") |
| Three or more results | Nested IF or IFS | =IFS(B2>=75000,"Gold",B2>=50000,"Silver",TRUE,"Bronze") |
IF with AND: all conditions must be true#
AND returns TRUE only when every test inside it is true. IF then picks a result based on that one TRUE or FALSE. In E2:
=IF(AND(B2>=50000,D2>=2),"Bonus","No bonus")Fill it down to E7 (Windows: Ctrl+D; Mac: Cmd+D). Aisha, Dev and Femi get Bonus. Ben misses on sales, and Carla misses on years: she sold 75,000 but has only one year. That is AND at work. One false test is enough to make the whole thing false.
The IF AND formula guide covers this pattern in more depth, and the AND function guide lists its rules. A very common use is a range check, such as "between 40,000 and 60,000": =IF(AND(B2>=40000,B2<=60000),"Mid","Other"). See how to check if a number is between two values.
IF with OR: any condition can be true#
OR returns TRUE when at least one test is true. Say a rep gets a review if they sold 70,000 or more or have four or more years:
=IF(OR(B2>=70000,D2>=4),"Review","")Ben (5 years), Carla (75,000) and Femi (both) get Review. Aisha, Dev and Elena meet neither test, so the cell shows nothing, because "" is an empty text result.
To test one cell against several values, OR is handy too: =IF(OR(C2="North",C2="East"),"Team A","Team B").
IF with NOT: when a condition must be false#
NOT flips TRUE to FALSE and back. These two formulas do the same thing:
=IF(NOT(C2="South"),"Yes","No")
=IF(C2<>"South","Yes","No")<> means "not equal to" in Excel. Most people find it easier to read than NOT for a single test. NOT is more useful around a bigger test, such as NOT(OR(...)) for "neither of these". The AND, OR and NOT lesson practises all three.
Combining AND and OR in one IF#
You can put OR inside AND (or the other way round) for rules like "North or East, and sales of at least 55,000":
=IF(AND(OR(C2="North",C2="East"),B2>=55000),"Yes","No")Excel works from the inside out. First OR checks the region. Then AND checks that result together with the sales test. Aisha, Carla, Dev and Femi return Yes. Ben and Elena are in South, so OR is FALSE and the answer is No.
With several brackets, it helps to build the formula in pieces: write and test the OR on its own, then wrap it in AND, then wrap that in IF. The guide to using IF, AND and OR together has more mixed examples.
Nested IF and IFS: more than two results#
When each condition leads to a different result, put one IF inside another. Here is a tier for each rep:
=IF(B2>=75000,"Gold",IF(B2>=50000,"Silver","Bronze"))Carla and Femi get Gold, Aisha and Dev Silver, Ben and Elena Bronze. The order matters: test the highest threshold first. If you test B2>=50000 first, Carla's 75,000 stops there and gets Silver.
In Excel 2019, Excel 2021 and Microsoft 365, the IFS function does the same with fewer brackets:
=IFS(B2>=75000,"Gold",B2>=50000,"Silver",TRUE,"Bronze")IFS checks each test in order and returns the result next to the first true one. TRUE at the end is a catch-all for everything else. Without it, a value that matches no test gives #N/A. Read more in the nested IF guide and in nested IF vs IFS, and see the IF function guide for the basic syntax.
Multiple conditions with text and dates#
The same patterns work with text and dates, not just numbers. Text goes in double quotes, and a date is safest built with the DATE function, so Excel can't misread it as text. For example, if column F held a start date:
=IF(AND(C2="North",F2<DATE(2024,1,1)),"Senior North","Other")This returns "Senior North" only for North reps who started before 1 January 2024. Text tests are not case-sensitive, so "north" matches "North". To match part of a word, such as any region containing "east", wrap SEARCH in ISNUMBER: ISNUMBER(SEARCH("east",C2)) is TRUE for East, North-East and Southeast.
Common mistakes with multiple conditions#
- Writing AND between the tests.
=IF(B2>=50000 AND D2>=2,...)is not valid. AND is a function:AND(B2>=50000,D2>=2). - Chaining comparisons.
=IF(40000<B2<60000,...)does not work as it reads. Excel compares 40000<B2 first, gets TRUE or FALSE, then compares that with 60000. UseAND(B2>40000,B2<60000). - Forgetting quotes around text.
C2=Northgives #NAME?. WriteC2="North". - Testing in the wrong order in a nested IF, so a high value stops at a low tier.
- Using AND inside COUNTIFS or SUMIFS. They do not need it. For counts, list the conditions as pairs:
=COUNTIFS(B2:B7,">=50000",D2:D7,">=2")returns 3. - Missing brackets. Every function you open needs a closing bracket. Excel colours each pair as you type, which helps you check.
Practise it#
Reading formulas is easy; typing them correctly under a timer is what tests check. Practise nested IF and IFS in a live spreadsheet: you write each formula and it checks your answer instantly. Then try the bonus exercise on this page. Not sure where your logic skills stand? Take the Excel level test to find the right lesson to start with.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Staff get a bonus if their Sales (B2) are at least 50000 and they have worked at least 2 Years (D2). In E2, write an IF with AND that returns Bonus or No bonus.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Result | |||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 | ||||||
| 9 | ||||||
| 10 |
Tip: AND goes inside IF as the test: =IF(AND(B2>=50000,D2>=2), then the two results in double quotes.
Practise this in a lesson
Frequently asked questions
How do I use IF with multiple conditions in Excel?
Wrap the conditions in AND or OR and put that inside IF. =IF(AND(B2>=50000,D2>=2),"Bonus","No bonus") returns Bonus only when both are true. Use OR when any one condition is enough.
How many conditions can an IF statement have?
AND and OR accept up to 255 conditions each, and Excel allows up to 64 nested IFs. In practice, more than three or four nested levels is hard to read, so use IFS or a lookup table instead.
What is the difference between nested IF and IFS?
They give the same results. IFS lists each test and result as pairs in one function, so there are fewer brackets. IFS needs Excel 2019, Excel 2021 or Microsoft 365, while nested IF works in every version.
Can I use AND and OR in the same IF formula?
Yes. Put OR inside AND, or AND inside OR, for example =IF(AND(OR(C2="North",C2="East"),B2>=55000),"Yes","No"). Check the brackets carefully.
Why does my IF formula with AND return the wrong answer?
Common causes are a test written backwards, such as <= instead of >=, text without double quotes, numbers stored as text, or a chained test like 40000<B2<60000, which Excel does not read the way you expect.