What you will learn
- Check two things at once with AND and OR
- Use them inside IF
How it works
AND means all the tests must be true.
OR means at least one test must be true.
Put them inside IF to get a clear answer like "Yes" or "No".
Formulas at a glance
=AND(cond1, cond2) | all must be true |
=OR(cond1, cond2) | any can be true |
=IF(AND(B2>=2,C2>=4),"Yes","No") | The pattern to follow |
Example
Write the formula to show "Yes" if Ana has 2 or more Years AND a Rating of 4 or more. Otherwise show "No".
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Employee | Years | Rating | Bonus? | Review? |
| 2 | Ana | 3 | 4.5 | ||
| 3 | Ben | 1 | 3.8 | ||
| 4 | Cleo | 6 | 2.9 | ||
| 5 | Dev | 0.5 | 4.2 | ||
| 6 | Eli | 2 | 4 | ||
| 7 | Fay | 4 | 3.1 |
Click D2 and type =IF(AND(B2>=2,C2>=4),"Yes","No"), then press Enter.
The answer is Yes.
When to use it
- Bonus only if sales and attendance are both high
- Weekend if the day is Saturday or Sunday
- Any choice that depends on more than one test
Common mistakes
- Writing B2>=2 AND C2>=4Excel needs the function form: AND(B2>=2,C2>=4).
- Mixing up AND and ORAND = all must be true. OR = any one is enough.
- Forgetting to put it inside IFOn its own, AND shows TRUE or FALSE.
Quick check
What does =AND(TRUE, FALSE) give?
- TRUE
- FALSE
#VALUE!- 1
Show the answer
B. FALSE AND needs every test to be true.
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.