Logical functions

AND

Matches all 1,264 recorded answers

Recorded: 1,210 in the answer bank and 54 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicAND
BulgarianAND
CzechAND
DanishAND
GermanUND
GreekAND
English (Australia)AND
English (United Kingdom)AND
English (United States)AND
SpanishY
EstonianAND
FinnishAND
FrenchET
HebrewAND
CroatianAND
HungarianAND
IndonesianAND
ItalianAND
JapaneseAND
KoreanAND
LithuanianAND
LatvianAND
NorwegianAND
DutchAND
PolishAND
Portuguese (Brazil)AND
Portuguese (Portugal)E
RomanianAND
RussianAND
SlovakAND
SlovenianAND
Serbian (Latin)AND
SwedishOCH
ThaiAND
TurkishVE
UkrainianAND
VietnameseAND
Chinese (Simplified)AND
Chinese (Hong Kong)AND
Chinese (Traditional)AND

Names from Microsoft's support site.

What it does

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

AND is not a two-operand boolean connective. It is a variadic reduction over a truth scan, and that difference is the whole content of the function.

The scan walks the argument list left to right. Each argument is expanded: a direct scalar contributes itself; a reference or array contributes every cell it designates, in row-major order. Each expanded item is then classified into exactly one of three buckets:

ItemClassification
Logicalits own truth value
Numberfalse if the number is exactly 0, true otherwise
Text or empty inside an array or reference argumentskipped — contributes nothing
Errorthe scan stops and that error is the result

The result is then:

  1. FALSE if any item classified false;
  2. TRUE if at least one item classified (true or false) and none classified false;
  3. #VALUE! if no item classified at all — every item was skipped.

Rule 3 is the clause readers forget. AND over a range holding nothing but text is not vacuously TRUE; it is an error. Microsoft's documentation states this directly for the range case: when the specified range contains no logical values, AND returns #VALUE!. In logical terms AND is therefore not the fold of conjunction over an empty list — it refuses the empty case rather than returning the identity element.

Arguments

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

  • Every argument is a condition or a container of conditions. Microsoft describes them as values that must evaluate to logical values, or arrays and references containing logical values.

The commonly misunderstood position is all of them at once: readers expect AND to coerce whatever it is handed, and it does not. Numbers and logicals participate; text and blanks reached through a range do not. See the shared rule in Coercion and lifting — direct arguments and range-scanned cells are governed by different policies, and AND is one of the families that exercises the difference.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

Returns a Logical, or an Error.

  • Zero versus nonzero. Any nonzero number is true, including negative numbers and the largest finite double. Only exact zero is false. There is no rounding or tolerance in this test.
  • Empty cells. Skipped, per the documented ignore rule.
  • All items skipped. #VALUE!, per rule 3 above.

How to implement

Notes for implementers

  1. Three buckets, not two. Modelling the item classification as Option<bool> — true, false, or skip — is what makes rule 3 expressible. A two-valued model cannot distinguish "no truth values present" from "all present values were true".
  2. Early exit is an optimisation with a visible edge. Returning FALSE the moment a falsy item is seen is only safe if you have already committed to error propagation ordering — an error after the first FALSE would never be seen. Whether Excel's own scan stops early is a real, observable question and is listed below as unchecked.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

AND · 1 lines · calc-func/src/catalogue/logical.rs on GitHub
logicals(AND, "AND", 255, and)
and · 9 lines · calc-func/src/catalogue/logical.rs on GitHub
/// AND: TRUE when every logical read is TRUE, FALSE when one is FALSE.
fn and(
    arguments: &[CalcValue],
    services: &mut EvalServices<'_>,
) -> Result<CalcValue, FunctionFault> {
    decide(AND, arguments, services, |tally| {
        tally.trues == tally.logicals
    })
}

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded1,210

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,210 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

Relationships

  • OR is the dual: same scan, same skip rules, same empty-scan #VALUE!, returning TRUE on the first truthy item instead of FALSE on the first falsy one.
  • XOR uses the same scan and returns the parity of the truthy items rather than their conjunction, which makes it a genuinely different reduction and not "OR without the ties".
  • NOT is the unary complement, and is not a reducer: it takes exactly one argument.
  • IF is where AND results usually land. IF(AND(a,b), x, y) is the idiom; note that AND evaluates every argument, so it does not give you short-circuit evaluation of side effects — it gives you a short-circuited scan over already-evaluated values.
  • Readers confuse AND with the * idiom ((a>1)*(b>2)), which multiplies coerced logicals and therefore has completely different empty/text behaviour and returns a number.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents