Formualizer Docs

AND

Returns TRUE only when all supplied values evaluate to TRUE.

AND evaluates every argument left to right, as Excel does: a FALSE does not hide a later error.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

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

Arguments

ArgumentTypeRequiredDefault
logical1anyRequired—
logical2anyOptional—

Accepts a variable number of arguments. Minimum: 1.

Return type

Logical (TRUE or FALSE)

Remarks

  • Booleans and numbers are accepted (0 is FALSE, non-zero is TRUE).
  • Text and blank cells inside a reference or array are ignored.
  • A direct text argument yields #VALUE!.
  • The first error in argument order (ranges scanned row by row) is returned.
  • With no logical values at all, the result is #VALUE!.

Examples

Combine one true condition with one false condition.

Formula =AND(TRUE,FALSE)

Expected result FALSE

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Add a third condition and compare the result.

Formula =AND(TRUE,TRUE,FALSE)

Expected result FALSE

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Evaluate the logical operation with just one false argument.

Formula =AND(FALSE)

Expected result FALSE

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A supplied argument evaluates to an error.

Formula =AND(TRUE,1/0)

Expected result #DIV/0!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

All truthy inputs

Formula =AND(TRUE, 1, 5)

Expected result TRUE

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Text input causes VALUE error

Formula =AND(TRUE, "x")

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What happens with blanks and text in AND?

Text and blank cells in a reference or array are ignored; a direct text argument yields #VALUE!. If nothing logical remains, AND returns #VALUE!.

Implementation

Engine source

On this page