Logical · all conditions must be TRUE · Nov 2026

The AND function,
measured & explained.

Syntax, a live playground, a measured truth table and coercion gallery, the eager-evaluation trap, and a sourced error library: all conditions must be TRUE.

D1
fx
=AND(A2>=60, B2>=90)
0
truth-table rows measured
0
sourced errors fixed
0
platforms checked
// 01 — Anatomy

How AND works

Returns TRUE only if all arguments are TRUE — the all-must-pass gate. It returns a single logical value, so it is usually combined with IF to branch to a result.

=AND(A2>=60, B2>=90)
logical1Required. The first condition to test.
logical2Optional. Up to 255 conditions in Excel.
vs OROR needs only one TRUE; AND needs every one.
// 02 — The truth gate

What AND actually returns

AND is the all-must-pass gate: TRUE only when every argument is TRUE. The tables below were measured live in the HyperFormula engine. Click any truth-table row to load it into the live playground.

Truth table

ABAND(A,B)
TRUETRUETRUE
TRUEFALSEFALSE
FALSETRUEFALSE
FALSEFALSEFALSE

What counts as TRUE? (measured coercion)

Numbers, text and blanks do not all behave the same. Every value below was measured in the engine.

InputAND resultWhy
=AND(2)TRUENon-zero number → TRUE
=AND(0)FALSEZero → FALSE
=AND(-1)TRUENegative is non-zero → TRUE
=AND("TRUE")TRUEThe text "TRUE" coerces to logical TRUE
=AND("yes")#VALUE!Other text cannot coerce → #VALUE!
=AND(E2) (blank cell)FALSEA blank reference reads as FALSE
=AND(TRUE,"")FALSEEmpty string literal → FALSE
⚠ The eager-evaluation trap. AND evaluates every argument before deciding — so one failing argument errors the whole formula even when the result is already determined. IF is different: it is lazy.
InputResultWhy
=AND(FALSE,1/0)#DIV/0!Even though the answer is already decided, the 1/0 still errors the whole formula
=IF(FALSE,1/0,5)5IF is lazy: the untaken branch is never evaluated
=IFERROR(AND(FALSE,1/0),"safe")safeWrap the whole call to absorb the error

The all-must-pass gate

AND is a gate: every condition must clear. A common real use is a multi-rule approval.

RuleResultMeaning
=AND(A2>=60,B2>=90)TRUEScore and attendance both clear
=AND(A2>=0,A2<=100)TRUECorrect "between" check (two comparisons)
=0<A2<100FALSEWrong: chained comparison does not mean "between"
Fix the chained comparison. 0<A2<100 is parsed as (0<A2)<100; the inner TRUE then compares against 100 and collapses. Always split it: AND(A2>0, A2<100).
// 03 — Try it live

Interactive AND playground

Edit the table or type any formula — the HyperFormula engine evaluates it instantly. Load a preset to see AND return TRUE/FALSE, coerce numbers and text, and hit the eager-evaluation trap in real time.

A1Sample data — click any cell to edit, the formula re-evaluates live
Result
—
✓ readyHyperFormula 3.5
// 04 — Error library

The real-world error library

8 failure patterns mined from actual user reports on Reddit, Stack Overflow and Super User — each with the authentic symptom, root cause, a fix, and a runnable formula. Not textbook theory.

// 05 — Cross-platform

Where AND works

AND is available across modern Excel, Google Sheets and LibreOffice. It has been in Excel since 2003, so every platform below supports it.

PlatformSupportNotesGotcha
✓ Supported full AND◐ Partial works with caveatsCompiled from public docs · verify against your build
// Go deeper

Master logical logic

AND is the gate. The full course walks the logical toolkit end to end — AND/OR/XOR/NOT, combining them with IF, and avoiding the coercion and eager-evaluation traps.

  • AND · OR · XOR · NOT — choosing the right combiner
  • Coercion: numbers, text and blanks as logicals
  • The eager-evaluation trap and the lazy IF fix
  • De Morgan’s laws and real approval gates
Free while in beta
Browse the function library

No account needed. Every page has a live playground.

// 07 — FAQ

Frequently asked