The AND function
AND checks several conditions and returns TRUE only if *all* of them pass. One FALSE is enough to make the whole result FALSE.
On its own it returns TRUE or FALSE. Most of the time you'll put it inside IF, so the sheet shows a word or a figure instead.
=AND(logical1, [logical2], ...)
Arguments
- logical1
- The first condition, such as
B2>=2, or a cell holding TRUE or FALSE. - logical2, ...optional
- More conditions. All of them must be TRUE for AND to return TRUE.
Try it
=AND(B2>=2,C2) in D2. Maya has at least 2 years' experience and C2 is TRUE, so both conditions pass and AND returns TRUE.
D2
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Applicant | Years' experience | Driving licence | Eligible | |
| 2 | Maya | 3 | TRUE | TRUE | |
| 3 | Jack | 5 | FALSE | ||
| 4 | Isla | 1 | TRUE | ||
| 5 | Noah | 2 | TRUE | ||
| 6 | |||||
| 7 |
Edit the formula in D2, or change the data, and press Enter.
More examples
| Formula | Result | What it does |
|---|---|---|
| =AND(B3>=2,C3) | FALSE | Jack has the experience but no licence, so one FALSE makes the result FALSE. |
| =AND(B5>=2,C5) | TRUE | Exactly 2 years passes >=2. |
| =IF(AND(B4>=2,C4),"Interview","Not yet") | Not yet | Inside IF, AND decides which message to show. |
| =AND(C2:C5) | FALSE | A range works too: does every applicant have a licence? |
Tips
- For "between" checks, use AND with two comparisons:
=AND(B2>=18,B2<=65). - Need any one condition rather than all of them? Use OR.
- AND works well inside conditional formatting rules to highlight rows that pass several tests.
Common mistakes
- `=18<=B2<=65` gives the wrong answer.Spreadsheets don't chain comparisons like that. Write
=AND(B2>=18,B2<=65). - #VALUE! appears.A condition is plain text rather than a comparison, e.g.
AND(B2,"Yes"). Compare instead:B2="Yes". - You expected AND to show a word.AND only returns TRUE or FALSE. Wrap it in IF to choose what to display.
Practise AND with instant feedback
Type real formulas into a working spreadsheet and get told straight away whether they work.