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.
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 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.
| A | B | OR(A,B) |
|---|---|---|
| TRUE | TRUE | TRUE |
| TRUE | FALSE | TRUE |
| FALSE | TRUE | TRUE |
| FALSE | FALSE | FALSE |
Numbers, text and blanks do not all behave the same. Every value below was measured in the engine.
| Input | OR result | Why |
|---|---|---|
| =OR(FALSE,0) | FALSE | Zero → FALSE, so OR stays FALSE |
| =OR(FALSE,-3) | TRUE | Non-zero → TRUE, so OR flips TRUE |
| =OR("TRUE") | TRUE | Text "TRUE" coerces → TRUE |
| =OR("yes") | #VALUE! | Other text → #VALUE! |
| =OR(E2:E5) (all blank) | FALSE | No TRUE anywhere → FALSE |
| =OR(C3) (cell = 0) | FALSE | Referenced zero → FALSE |
IF is different: it is lazy.| Input | Result | Why |
|---|---|---|
| =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) | 5 | IF is lazy: the untaken branch is never evaluated |
| =IFERROR(OR(TRUE,1/0),"safe") | safe | Wrap the whole call to absorb the error |
OR is a trigger: one clear condition is enough. Typical use is an alert or eligibility screen.
| Rule | Result | Meaning |
|---|---|---|
| =OR(A2>=90,B2>=90) | TRUE | Either score or attendance is excellent |
| =OR(C2,C3) | TRUE | Either member flag is TRUE |
| =OR(A2>=95,A3>=95) | FALSE | Neither clears 95 |
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.
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.
OR 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 |
|---|
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.