The AND function in Excel
AND returns TRUE only when every condition you give it is true, and FALSE if even one fails. On its own it gives a TRUE/FALSE answer, but its real job is inside IF: "pay the bonus only if sales hit target and the rep is certified". Expect it in almost any Excel test that has a rule with more than one part.
Syntax
=AND(logical1, [logical2], ...)
| logical1 | The first condition to check, like C2>=50000 or E2="Yes". |
|---|---|
| logical2, ... | Optional. More conditions, up to 255 in total. All of them must be TRUE for AND to return TRUE. |
Try it yourself
This is a live spreadsheet. Type the formula and press Enter.
An employee qualifies for the leadership program with at least 2 years of service and a rating of 4 or higher. In E2, use AND to return TRUE or FALSE using the years in C2 and the rating in D2.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Qualifies? | ||||||
| 2 | |||||||
| 3 | |||||||
| 4 | |||||||
| 5 | |||||||
| 6 | |||||||
| 7 | |||||||
| 8 | |||||||
| 9 |
Tip: Write one comparison for each rule, separated by a comma. "At least" and "or higher" both mean >=.
Examples
=AND(C2>=50000,D2>=120)→ TRUEAmara hit both targets, $50,000 in sales and at least 120 calls, so AND returns TRUE.
=IF(AND(C4>=50000,E4="Yes"),"Bonus","No bonus")→ "No bonus"Hana's sales are high, but she isn't certified. One failed condition is enough, so IF returns "No bonus".
=AND(C5>=40000,C5<=50000)→ TRUETwo tests on the same cell check that a value sits inside a range. Luca's sales are between $40,000 and $50,000.
Example data
| 1 | Rep | Region | Sales | Calls | Certified |
|---|---|---|---|---|---|
| 2 | Amara | North | 52000 | 140 | Yes |
| 3 | Diego | South | 38500 | 165 | Yes |
| 4 | Hana | North | 61200 | 98 | No |
| 5 | Luca | West | 47800 | 152 | Yes |
Common mistakes
Writing a range like in math class
=40000<=C5<=50000doesn't work in Excel. It compares the first part, gets TRUE, then compares TRUE with 50000, which gives the wrong answer. Write it asAND(C5>=40000,C5<=50000).Expecting a label instead of TRUE/FALSE
AND only ever returns TRUE or FALSE. To show words like "Eligible", put AND inside IF:
=IF(AND(...),"Eligible","Not eligible").Using AND on whole columns in FILTER or SUMPRODUCT
AND(B2:B9="North",C2:C9>50000)returns one TRUE/FALSE for all the rows together, not one per row. Multiply the tests instead:(B2:B9="North")*(C2:C9>50000).Mixing up AND and OR
AND needs every condition to be true. If the rule says "either" or "at least one", you want OR.
FAQ
What's the difference between AND and OR?+
AND returns TRUE only if all conditions are true. OR returns TRUE if at least one condition is true.
How do I use AND with IF?+
Use AND as the test: =IF(AND(C2>=50000,E2="Yes"),"Bonus",""). IF returns its first result only when every condition inside AND is met.
How many conditions can AND check?+
Up to 255. If you need more than a handful, a helper column or COUNTIFS is usually easier to read.
Lesson
Master AND step by step: AND, OR and NOT
Check several conditions at once with AND and OR, flip a result with NOT, and combine them inside IF.