What AND does
AND checks two or more conditions and returns TRUE only when every one of them is true. If even one is false, it returns FALSE. =AND(B2>=2,C2>=4) is TRUE for someone with at least two years in the job and a rating of 4 or more, because they need both to qualify.
On its own, AND fills a cell with TRUE or FALSE, which is handy as a check column. Most of the time it sits inside IF as the test, so the cell shows one result when everything holds and another when it doesn’t.
Each condition is a comparison, just like the test in IF, such as B2>=2 or C2="Yes".
Syntax
logical1Required- The first condition, such as
B2>=2. Anything that works out to TRUE or FALSE will do. logical2Optional, can repeat- More conditions, separated by commas, up to 255 in all. AND is TRUE only if every one of them is TRUE.
Example: who qualifies for the scheme
People qualify with at least 2 years of service and a rating of at least 4. The formula in D2 is filled down to D5.
Dan qualifies with exactly 2 years and a rating of exactly 4, because >= includes the limit.
Example: AND as the test inside IF
Expense claims under €500 with a receipt attached are approved automatically. Everything else gets checked.
For practice, the free lesson Combine tests with AND, OR and NOT starts with an eligibility check like the first example.
Common mistakes
=IF(B2<500 AND C2="Yes",…)isn’t a formula Excel accepts. The conditions go inside AND, separated by commas.=AND(2<=B2<=5)doesn’t test “between 2 and 5”. Write two conditions:=AND(B2>=2,B2<=5).C2=Yeswithout quotation marks looks for something named Yes and gives#NAME?. WriteC2="Yes".- “Saturday or Sunday” can’t both be true on one day, so AND would always say FALSE there. When any one condition is enough, use OR.
Frequently asked questions
Can AND check three or more conditions?
Yes, up to 255. Separate them with commas: =AND(B2>=2,C2>=4,D2="Yes") is TRUE only when all three are true.
What is the difference between AND and OR?
AND is TRUE only when every condition is true. OR is TRUE when at least one is.
How do I use AND with text?
Compare the cell with the text in quotation marks, as in =AND(B2="Paid",C2="Yes"). Capitals don’t matter. To test for a word anywhere in a cell, use ISNUMBER(SEARCH("word",B2)) as one of the conditions.
Can I use AND in conditional formatting?
Yes. Select the rows, choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format, and enter a rule such as =AND($B2>=2,$C2>=4). The dollar signs keep every cell in a row looking at columns B and C.
Can AND check a whole range?
Yes, a range of TRUE and FALSE values: =AND(D2:D5) is TRUE when every cell in D2:D5 is TRUE. To count how many rows pass several tests, COUNTIFS is the clearer choice.
Why is my AND formula not working?
Each condition has to be a full comparison. Text on its own, as in =AND(B2>=2,"Yes"), gives #VALUE!. If AND says FALSE when every condition looks true, test each one in a spare cell: a trailing space or a number stored as text is often the cause.