Logic function
Excel AND function
AND checks several conditions and returns TRUE only if all of them are true. On its own it shows TRUE or FALSE, but it is most useful inside IF when a row has to pass more than one rule.
=AND(logical1, [logical2], ...)Arguments
logical1- The first condition to check.
logical2- More conditions. You can check up to 255 in total.
AND examples
Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Employee | Dept | Years | Rating |
| 2 | Ana Ruiz | Sales | 6 | 4.5 |
| 3 | Ben Cole | Support | 2 | 4.8 |
| 4 | Cara Diaz | Sales | 3 | 3.9 |
| 5 | Dev Shah | IT | 8 | 4.2 |
Result: TRUE
Ana has 6 years and a 4.5 rating, so both tests pass and AND returns TRUE.
Result: FALSE
Ben has a great rating but only 2 years, so one false test makes the result FALSE.
Result: Bonus
Inside IF, AND decides who gets a bonus: Sales staff rated 4 or higher.
Result: TRUE
A common pattern for "between": Dev's 8 years is above 3 and below 10.
How to use AND
- Decide which conditions must all be true.
- Type =AND( and list each condition separated by commas.
- Close the bracket to see TRUE or FALSE.
- Wrap it in IF to show your own words instead.
Common AND mistakes
Writing 3<C2<10
Excel does not chain comparisons. Use AND(C2>3,C2<10).
Using AND when you mean OR
AND needs every test to pass. If any one test is enough, use OR.
Expecting AND to return a label
AND only returns TRUE or FALSE. Put it inside IF to return text or a number.
AND FAQ
How do I use IF and AND together in Excel?
Put AND as the first argument of IF: =IF(AND(B2>50,C2="Yes"),"OK","Check"). IF returns "OK" only when both conditions are true.
How do I check if a number is between two values in Excel?
Use =AND(A2>=10,A2<=20). It returns TRUE when A2 is from 10 to 20 inclusive.
What does AND return if a cell is empty?
Empty cells in a range are ignored. A comparison like A2>5 on an empty cell treats it as 0, so that test is FALSE.
Practice AND in these lessons
Guides that use AND
- Excel IF statement with multiple conditions
- How to use IF with AND and OR in Excel
- Excel formulas cheat sheet: the 25 everyone should know
Related functions
ORTrue if any test is trueNOTFlips TRUE and FALSEIFPicks a result from a testIFSFirst true test wins
Updated