Logical · any condition can be TRUE · Nov 2026

The OR function,
measured & explained.

Syntax, a live playground, a measured truth table and coercion gallery, the eager-evaluation trap, and a sourced error library: any condition can be TRUE.

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

How OR works

Returns TRUE if any argument is TRUE — the any-passes trigger. It returns a single logical value, so it is usually combined with IF to branch to a result.

=OR(A2>=90, B2>=90)
logical1Required. The first condition to test.
logical2Optional. Up to 255 conditions in Excel.
vs ANDAND needs every TRUE; OR needs only one.
// 02 — The trigger

What OR actually returns

OR is the any-passes trigger: TRUE when at least one 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

ABOR(A,B)
TRUETRUETRUE
TRUEFALSETRUE
FALSETRUETRUE
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.

InputOR resultWhy
=OR(FALSE,0)FALSEZero → FALSE, so OR stays FALSE
=OR(FALSE,-3)TRUENon-zero → TRUE, so OR flips TRUE
=OR("TRUE")TRUEText "TRUE" coerces → TRUE
=OR("yes")#VALUE!Other text → #VALUE!
=OR(E2:E5) (all blank)FALSENo TRUE anywhere → FALSE
=OR(C3) (cell = 0)FALSEReferenced zero → FALSE
⚠ The eager-evaluation trap. OR 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
=OR(TRUE,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(OR(TRUE,1/0),"safe")safeWrap the whole call to absorb the error

The any-passes trigger

OR is a trigger: one clear condition is enough. Typical use is an alert or eligibility screen.

RuleResultMeaning
=OR(A2>=90,B2>=90)TRUEEither score or attendance is excellent
=OR(C2,C3)TRUEEither member flag is TRUE
=OR(A2>=95,A3>=95)FALSENeither clears 95
OR vs AND. Swap OR for AND and the same rules become a gate (all must pass). Use OR for "any of", AND for "all of".
// 03 — Try it live

Interactive OR playground

Edit the table or type any formula — the HyperFormula engine evaluates it instantly. Load a preset to see OR 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 OR works

OR 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 OR◐ Partial works with caveatsCompiled from public docs · verify against your build
// Go deeper

Master logical logic

OR is the trigger. 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
  • Alert screens and eligibility rules
Free while in beta
Browse the function library

No account needed. Every page has a live playground.

// 07 — FAQ

Frequently asked