Skip to content

AND

Returns TRUE only when every condition you give it is true. Use it inside IF to test several conditions at once.

Syntax

=AND(, [logical2], ...)

Logical

Every version of Excel, including Microsoft 365, Excel 2024, 2021, 2019, 2016 and earlier, Excel for the web and the mobile apps.

Try it

Edit the formula in D2 or change the inputs. The sheet recalculates as you type.

D2
A
B
C
D
E
1
Applicant
Age
Years experience
Eligible
2
A-01
24
3
TRUE
3
A-02
17
5
4
5

D2 =AND(B2>=18,C2>=2) returns TRUE

How AND works

AND checks several conditions and returns TRUE only if all of them are true. If even one is false, the result is FALSE. On its own it just gives TRUE or FALSE, so it is almost always used inside IF, which turns that answer into a result: =IF(AND(B2>=18, C2="Yes"), "Eligible", "Not eligible").

The arguments

Each argument is a condition: a comparison such as B2>=18 or A2<>"", a cell or formula that returns TRUE or FALSE, or a range of such values. You can give up to 255.

  • A number is treated as TRUE unless it is zero.
  • Text and empty cells inside a range argument are ignored. If every argument is text or empty, AND returns #VALUE!.
  • Text typed directly as an argument, other than "TRUE" and "FALSE", returns #VALUE!.
  • If any argument is an error, AND returns that error.

AND with ranges

=AND(B2:B6>0) tests every cell in the range at once and returns TRUE only if all five are above zero. In Microsoft 365 and Excel 2021 or later this works as a normal formula. In older versions it needs to be entered as an array formula, with Ctrl+Shift+Enter.

AND does not work row by row

A common surprise is using AND over a column and expecting a column of answers. It always returns a single TRUE or FALSE. To get one result per row, write the test on each row (=AND(B2>=18, C2="Yes") filled down), or multiply the conditions inside a single array formula: =(B2:B9>=18)*(C2:C9="Yes") returns 1 or 0 for each row. AND is also not a short-circuit: it evaluates every argument even after finding a false one, so an error in a later argument still shows.

AND with other logical functions

  • OR returns TRUE when any condition is true. Combine them: =AND(A2="East", OR(B2>1000, C2="Key")).
  • NOT reverses a result: =AND(B2>0, NOT(ISBLANK(C2))).
  • For a range check such as "between 10 and 20", =AND(B2>=10, B2<=20) is the standard form. Excel doesn't accept 10<=B2<=20.

SUMIFS and COUNTIFS as alternatives

When the goal is to count or total rows that meet several conditions, SUMIFS and COUNTIFS do that directly, without a helper column of ANDs. Use AND when you need a TRUE/FALSE flag per row, or when you are making a decision with IF.

Readability

If a formula strings together more than three or four conditions, put each one in its own helper column or move the thresholds into cells with labels. A formula such as AND(B2>=18, B2<=65, C2="Yes", D2<>"Blocked") is fine. One with ten conditions is a maintenance risk.

Arguments

logical1
The first condition, such as B2>=18, or a range of TRUE/FALSE values. A number counts as true if it isn't zero.
logical2, ...optional
More conditions, up to 255. AND returns TRUE only if every one is true. Text and empty cells inside a range are ignored. If no argument holds a logical value, AND returns #VALUE!.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Both conditions must be true

D2 =AND(B2>=18,C2>=2)

Result: TRUE

A-01 is at least 18 and has at least 2 years, so both tests are true. A-02 is 17, so AND would return FALSE even though the experience test passes.

D2
A
B
C
D
E
1
Applicant
Age
Years experience
Eligible
2
A-01
24
3
TRUE
3
A-02
17
5
4
5

D2 =AND(B2>=18,C2>=2) returns TRUE

Example 2

AND inside IF to return text

D2 =IF(AND(B2>=18,C2>=2),"Eligible","Review")

Result: Review

The age test fails, so AND returns FALSE and IF returns "Review".

D2
A
B
C
D
E
1
Applicant
Age
Years experience
Decision
2
A-02
17
5
Review
3
4
5

D2 =IF(AND(B2>=18,C2>=2),"Eligible","Review") returns Review

Example 3

A value between two limits

B2 =AND(A2>=10,A2<=50)

Result: TRUE

This is the standard "between" test: at least 10 and at most 50. Excel doesn't accept 10<=A2<=50 as one comparison.

B2
A
B
C
D
1
Order qty
In range?
2
40
TRUE
3
4

B2 =AND(A2>=10,A2<=50) returns TRUE

Example 4

Test a whole range at once

C2 =AND(A2:A5>0)

Result: FALSE

The range test is applied to every cell, and A4 is 0, so the result is FALSE. AND returns one answer for the whole range, not one per row.

C2
A
B
C
D
1
Weekly sales
All weeks above zero?
2
410
FALSE
3
385
4
0
5
498
6
7

C2 =AND(A2:A5>0) returns FALSE

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In E2, return TRUE when the applicant is at least 18, has at least 2 years of experience and is certified (Yes in column D). Fill down to E8.

Answer in E2, then it fills down to E8.

E2
A
B
C
D
E
F
1
Applicant
Age
Years experience
Certified
Eligible
Decision
2
A-01
24
3
Yes
3
A-02
17
5
Yes
4
A-03
31
1
Yes
5
A-04
45
12
No
6
A-05
18
2
Yes
7
A-06
29
4
Yes
8
A-07
30
6
Yes

Common mistakes

  • AND returns one TRUE or FALSE, never one result per row. Fill a row-level AND down, or multiply the conditions to get an array.
  • 10<=A2<=50 doesn't work as a "between" test. Write AND(A2>=10, A2<=50).
  • AND doesn't stop at the first false condition. If a later argument contains an error, AND returns the error even when an earlier argument is false.
  • Text and empty cells inside a range are ignored, and if nothing logical remains, AND returns #VALUE!. A cell that holds the text "TRUE" isn't the logical TRUE.
  • Comparing text with = ignores case but not spaces. A trailing space makes "East "="East" false.

Questions people ask

How do I use AND with IF?

Put AND in IF's first argument: `=IF(AND(B2>=18, C2="Yes"), "Eligible", "No")`. IF returns the second argument only when every condition in AND is 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 true.

Can AND check a range of cells?

Yes. `=AND(A2:A9>0)` returns TRUE only if every cell in the range is above zero. In Excel 2019 and earlier, enter it with Ctrl+Shift+Enter.

Why does AND return #VALUE!?

None of its arguments produced a logical value. This happens when you give it only text or only empty cells. Check that each argument is a comparison.

Is there a shortcut for AND in a formula?

Multiplying conditions works the same way and can return an array: `=(B2:B9>=18)*(C2:C9="Yes")` gives 1 where both are true. Use AND inside IF for readability.

Learn AND in a real sheet.

AND is taught in Logic and text, lesson 2: AND and OR inside IF. Each lesson is a short, graded exercise like the one above.