The example data
A small sales team: each rep’s region, their sales this quarter and how many years they’ve been on the team. Column E is where the answers go. Every example below asks a question about a rep that needs more than one thing checked.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Sales | Years | Result |
| 2 | Maya | West | 12400 | 3 | |
| 3 | Leo | East | 8700 | 6 | |
| 4 | Ana | West | 9800 | 1 | |
| 5 | Sam | North | 15200 | 4 | |
| 6 | Nia | East | 11000 | 2 | |
| 7 | Omar | West | 6400 | 7 |
All conditions must be true: IF with AND
Say West reps get a bonus when they sell 10,000 or more. That’s two checks, and both have to pass. Put them inside AND, separated by a comma, and use the whole thing as the test in IF:
On its own, =AND(C2>=10000,B2="West") returns TRUE or FALSE. IF just turns that into words. Ana is in the West too, but she sold 9,800, so her row comes back blank. Fill the formula down and only Maya gets the bonus:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Sales | Years | Bonus |
| 2 | Maya | West | 12400 | 3 | Bonus |
| 3 | Leo | East | 8700 | 6 | |
| 4 | Ana | West | 9800 | 1 | |
| 5 | Sam | North | 15200 | 4 | |
| 6 | Nia | East | 11000 | 2 | |
| 7 | Omar | West | 6400 | 7 |
AND takes as many conditions as you like, so a third check is just another comma. See IF with AND for more practice.
Any condition can be true: IF with OR
Now change the rule. A rep gets the bonus if they sold 10,000 or more, or if they’ve been on the team 5 years or longer. Either one is enough, so use OR:
Ana fails both checks, with 9,800 in sales and 1 year on the team, so she gets “No bonus”. Everyone else passes at least one.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Sales | Years | Bonus |
| 2 | Maya | West | 12400 | 3 | Bonus |
| 3 | Leo | East | 8700 | 6 | Bonus |
| 4 | Ana | West | 9800 | 1 | No bonus |
| 5 | Sam | North | 15200 | 4 | Bonus |
| 6 | Nia | East | 11000 | 2 | Bonus |
| 7 | Omar | West | 6400 | 7 | Bonus |
Mixing AND and OR
You can put one inside the other. For a bonus that’s only for the West, but where either big sales or long service counts, wrap the OR inside the AND:
=IF(AND(B7="West",OR(C7>=10000,D7>=5)),"Bonus","")Returns Bonus for Omar: he’s in the West, and his 7 years make the OR true even though he sold 6,400.
Read it from the inside out: first the OR, then the AND around it. If a formula like this gets hard to follow, write the conditions in separate columns first and check each one returns what you expect.
To check that something is not equal, use <>. =IF(B3<>"West","Other region","West") returns “Other region” for Leo, who is in the East.
More than two outcomes: nested IF
Sometimes the answer isn’t yes or no but one of several labels. Here: Gold for 15,000 or more, Silver for 10,000 or more, Bronze for everything else. The classic way is to put a second IF in the “otherwise” part of the first:
For Maya, at 12,400, the first test fails, so Sheets moves on to the second IF and returns Silver. It works, but every extra level adds another IF and another closing bracket, which is where most typos come from.
A cleaner way: IFS
IFS takes pairs of a test and the answer for it, checked in order. The first test that’s true wins:
The last pair, TRUE,"Bronze", is the catch-all. TRUE is always true, so anything that gets that far is Bronze. Fill it down and every rep gets a tier:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Sales | Years | Tier |
| 2 | Maya | West | 12400 | 3 | Silver |
| 3 | Leo | East | 8700 | 6 | Bronze |
| 4 | Ana | West | 9800 | 1 | Bronze |
| 5 | Sam | North | 15200 | 4 | Gold |
| 6 | Nia | East | 11000 | 2 | Silver |
| 7 | Omar | West | 6400 | 7 | Bronze |
Mistakes that give the wrong answer
Leaving out the catch-all in IFS
Unlike IF, IFS has no “otherwise” part built in. If no test is true, it returns #N/A:
=IFS(C4>=15000,"Gold",C4>=10000,"Silver")Returns #N/A for Ana. Add TRUE,"Bronze" at the end to fix it.
Putting the tests in the wrong order
Because the first true test wins, the strictest test has to come first. Flip them and Sam, with 15,200, is caught by the easier test before the Gold one is ever checked:
=IFS(C5>=10000,"Silver",C5>=15000,"Gold")Returns Silver, not Gold. Check from the highest threshold down.
Expecting text to be case-sensitive
Comparisons in IF ignore capital letters, so =IF(B2="west","Yes","No") returns Yes even though the cell says West. Usually that’s what you want. If you really need an exact match, use EXACT: =IF(EXACT(B2,"West"),"Yes","No").
Typing numbers in quotes
Write C2>=10000, not C2>="10000". In quotes, 10000 is text, and comparing a number with text won’t give the answer you expect.
Counting or adding instead of labeling
If what you actually want is a number, like how many West reps sold 10,000 or more, you don’t need an IF column at all. COUNTIFS checks several conditions across the whole range in one go:
=COUNTIFS(B2:B7,"West",C2:C7,">=10000")Returns 1: Maya is the only one who meets both conditions.
SUMIFS works the same way when you want to add up the sales that match instead of counting the rows.
Frequently asked questions
How do I use IF with two conditions in Google Sheets?
Put both conditions inside AND if both must be true, or OR if either is enough, and use that as the first part of IF, for example =IF(AND(C2>=10000,B2="West"),"Bonus","").
What’s the difference between AND and OR in an IF formula?
AND is true only when every condition is true. OR is true when at least one of them is. Swap one for the other and the same data can give quite different results.
Should I use nested IF or IFS?
IFS, in most cases. It does the same job with one function and fewer brackets. Just remember to end it with TRUE and a default answer, or rows that match nothing return #N/A.
Why does my IFS formula return #N/A?
None of its tests were true and there’s no catch-all. Add TRUE and a default value as the last pair, for example TRUE,"Bronze".
Is IF case-sensitive in Google Sheets?
No. ="west" matches West. Use EXACT inside the IF if you need capital letters to count.