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.
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 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.
| A | B | AND(A,B) |
|---|---|---|
| TRUE | TRUE | TRUE |
| TRUE | FALSE | FALSE |
| FALSE | TRUE | FALSE |
| FALSE | FALSE | FALSE |
Numbers, text and blanks do not all behave the same. Every value below was measured in the engine.
| Input | AND result | Why |
|---|---|---|
| =AND(2) | TRUE | Non-zero number → TRUE |
| =AND(0) | FALSE | Zero → FALSE |
| =AND(-1) | TRUE | Negative is non-zero → TRUE |
| =AND("TRUE") | TRUE | The text "TRUE" coerces to logical TRUE |
| =AND("yes") | #VALUE! | Other text cannot coerce → #VALUE! |
| =AND(E2) (blank cell) | FALSE | A blank reference reads as FALSE |
| =AND(TRUE,"") | FALSE | Empty string literal → FALSE |
IF is different: it is lazy.| Input | Result | Why |
|---|---|---|
| =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) | 5 | IF is lazy: the untaken branch is never evaluated |
| =IFERROR(AND(FALSE,1/0),"safe") | safe | Wrap the whole call to absorb the error |
AND is a gate: every condition must clear. A common real use is a multi-rule approval.
| Rule | Result | Meaning |
|---|---|---|
| =AND(A2>=60,B2>=90) | TRUE | Score and attendance both clear |
| =AND(A2>=0,A2<=100) | TRUE | Correct "between" check (two comparisons) |
| =0<A2<100 | FALSE | Wrong: chained comparison does not mean "between" |
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).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.
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.
AND is available across modern Excel, Google Sheets and LibreOffice. It has been in Excel since 2003, so every platform below supports it.
| Platform | Support | Notes | Gotcha |
|---|
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.