Excel AND Function
AND tests multiple conditions and returns TRUE only if every one is true, FALSE if any condition fails.
AND checks two or more conditions and returns TRUE only if all of them are true. If even one condition fails, AND returns FALSE, no exceptions. It's rarely used alone; most of the time you'll nest it inside IF to build formulas that depend on multiple criteria at once.
A "condition" in Excel is any comparison that evaluates to TRUE or FALSE, like C2>50000 or B2="Approved".
Syntax
=AND(logical1, [logical2], ...)
| Parameter | Required | Description |
|---|---|---|
logical1 | Yes | The first condition to check. Must evaluate to TRUE or FALSE, either directly or as a comparison like A2>10. |
logical2, ... | No | Additional conditions. Add as many as you need, up to 255 total in Excel 365. |
Basic Example
You're reviewing a bonus list. An employee qualifies only if their sales total exceeds $50,000 and they've been with the company at least 2 years.
=AND(C2>50000, D2>=2)
// C2 = the employee's total sales
// D2 = years employed
This returns TRUE if both conditions hold for that row and FALSE if either one fails. Notice that AND doesn't return a bonus amount or a label. It returns a plain TRUE or FALSE, which is exactly why it's almost always wrapped in something else, usually IF.
How AND Works
AND returns a single TRUE or FALSE, never a value
AND doesn't output text, numbers, or dates. It evaluates every argument you give it and collapses the result down to one logical value. If you want AND to trigger a specific output like "Approved" or a calculated bonus, you need to nest it inside IF.
AND checks every argument, even after one has already failed
This is the behavior most people don't expect. In most programming languages, once one condition fails, the rest are skipped. Excel's AND doesn't work that way: it evaluates all arguments regardless of whether an earlier one already returned FALSE.
That matters more than it sounds like. Consider this formula meant to avoid a division error:
=IF(AND(B2<>0, A2/B2>5), "Flag", "OK")
The intent is that A2/B2 never runs when B2 is 0. But AND evaluates both arguments before IF decides anything, so A2/B2 still executes and throws #DIV/0! even though the first condition correctly identified the zero. Use IF's own short-circuit behavior instead: =IF(B2=0, "OK", IF(A2/B2>5, "Flag", "OK")).
AND can test up to 255 conditions
You're not limited to two or three comparisons. Excel 365 accepts up to 255 arguments in a single AND function, though anything past 5 or 6 conditions usually signals it's time to restructure the logic with a helper column.
AND accepts ranges, not just individual comparisons
=AND(D2:D10>0) checks whether every cell in D2:D10 is greater than zero, all in one formula. Entered as a regular formula in modern Excel, this evaluates as an array internally and returns a single TRUE or FALSE for the whole range. No need to list ten separate arguments.
Text comparisons in AND aren't case-sensitive
B6="red", B6="Red", and B6="RED" all evaluate identically inside AND. If you need a case-sensitive comparison, wrap the argument in EXACT: AND(EXACT(B6,"Red"), C6>100).
Common Use Cases
Validating a data entry range directly
Check whether a value falls within an acceptable range, no IF required. This is the exact formula you'd drop into a data validation rule.
=AND(A2>=1, A2<=100) // TRUE only if A2 is between 1 and 100 inclusive
Approving a loan application against three criteria
A lender approves an application only if credit score, income, and debt ratio all clear their thresholds.
=IF(AND(C2>=680, D2>=45000, E2<=0.36), "Approve", "Deny")
// C2 = credit score
// D2 = annual income
// E2 = debt-to-income ratio
Driving a conditional formatting rule with AND alone
You don't need IF for conditional formatting. Highlighting overdue, high-value invoices works with AND on its own as the rule's formula.
=AND($C2>10000, $D2<TODAY())
// $C2 = invoice amount
// $D2 = due date
Combining AND with OR for compound logic
Approve an order if the customer is VIP and the order total exceeds $200, or if the customer already has 10 or more prior orders.
=IF(OR(AND(F2="VIP", G2>200), H2>=10), "Ship", "Hold")
// F2 = customer tier
// G2 = order total
// H2 = number of prior orders
Handling Errors
AND throws #VALUE! only when none of its arguments resolve to a logical value at all. That's a narrower condition than it looks. If you're using comparisons like AND(C2>50000, D2>=2), a blank C2 doesn't cause an error — Excel evaluates the comparison as 0>50000, a valid FALSE. The error shows up specifically when AND is fed a bare cell or range reference, with no comparison operator, and that reference contains nothing but blank or text cells.
Common causes of #VALUE!:
- AND is given a bare range reference instead of a comparison, and every cell in that range is blank or text
- The range accidentally includes only a header row or text label, with no logical or numeric values anywhere in it
- A nested formula inside AND returns an error, which propagates immediately
- An argument is plain text, like
"yes", rather than an actual comparison, and it's the only argument AND has to evaluate
=AND(D2:D10) // #VALUE! if every cell in D2:D10 is blank or text
=AND(D2:D10>0) // Works fine — blanks are treated as 0, which evaluates to FALSE
If AND returns #VALUE! on a formula that looks correct, check whether you passed a bare cell or range instead of a comparison. AND(C2) throws the error if C2 is blank, but AND(C2>0) doesn't — the comparison operator converts C2 to a real TRUE or FALSE first, even when C2 is empty.
Notes & Gotchas
Why does AND return #VALUE!?
AND returns #VALUE! only when none of its arguments evaluate to a logical value at all — for example, a bare range reference where every cell is blank or text, with no comparison operator involved. Wrapping the reference in a comparison like C2>0 sidesteps this, since blank cells resolve to 0 inside a comparison instead of being ignored outright. Check with ISLOGICAL if you're unsure whether a specific argument is resolving to TRUE/FALSE or dropping out of the evaluation entirely.
Does AND evaluate every condition even after one fails?
Yes. Unlike most programming languages, AND checks every argument regardless of whether an earlier one already returned FALSE. This matters when a later argument depends on an earlier one being true, such as dividing by a cell that might be zero. Guard against it by restructuring with nested IF statements instead of relying on AND to stop early.
Is AND case-sensitive?
No. AND treats "Red", "red", and "RED" as identical text values. If a formula needs to distinguish case, wrap the specific argument in EXACT, for example AND(EXACT(B2,"Red"), C2>50).
Does AND work with a range instead of individual conditions?
Yes. =AND(D2:D10>0) tests every cell in that range against the condition and returns one TRUE or FALSE for the entire block. This is faster to write than listing ten separate comparisons, though it only tells you whether all cells pass, not which ones failed.
How many conditions can AND test at once?
Excel 365 supports up to 255 arguments inside a single AND function. In practice, formulas with more than 5 or 6 conditions get hard to audit, and a helper column or a lookup table is usually a cleaner fix.
What happens if an argument is text instead of a comparison?
Text arguments are ignored unless they're the literal strings "TRUE" or "FALSE", in which case Excel converts them automatically. Any other text, like a name or a label, doesn't count as a logical value and can push AND toward returning #VALUE! if none of the other arguments qualify.
Related Functions
| Function | Use this when... |
|---|---|
OR | You need at least one condition to be true, not all of them. |
IF | You want AND's TRUE/FALSE result to trigger a specific output like text or a calculation. |
IFS | You have several independent conditions, each with its own separate outcome, instead of one combined test. |
Related Functions
Excel IF Function
IF is the function behind almost every conditional formula in Excel — pass or fail, over or under budget, yes or no. Here's how to write one that works on the first try.
Excel IFERROR Function
IFERROR replaces ugly error codes like #N/A and #DIV/0! with a value you choose. It's simple to use, but it catches every error type — including the ones you didn't mean to hide.
Excel ISBLANK Function
ISBLANK tells you whether a cell has absolutely nothing in it, not just whether it looks empty. Here's how it works, where it gets tricked, and what to use instead when it doesn't do what you expect.
Excel ISNUMBER Function
ISNUMBER tells you whether a cell holds a real number or something Excel only treats like one. It's the quiet workhorse behind data validation, error trapping, and text-search formulas.