Logical functions

OR

Matches all 1,247 recorded answers

Recorded: 1,212 in the answer bank and 35 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
Arabicأو
BulgarianИЛИ
CzechNEBO
DanishELLER
GermanODER
GreekΉ
English (Australia)OR
English (United Kingdom)OR
English (United States)OR
SpanishO bien
EstonianVÕI
FinnishTAI
FrenchOU
Hebrewאו
CroatianILI
HungarianVAGY
IndonesianATAU
ItalianOPPURE
Japaneseまたは
Korean또는
LithuanianARBA
LatvianVAI
NorwegianELLER
DutchOF
PolishLUB
Portuguese (Brazil)OU
Portuguese (Portugal)OU
RomanianSAU
RussianИЛИ
SlovakALEBO
SlovenianALI
Serbian (Latin)ILI
SwedishELLER
Thaiหรือ
TurkishVEYA
UkrainianАБО
VietnameseHOẶC
Chinese (Simplified)或
Chinese (Hong Kong)或者
Chinese (Traditional)或者

Names from Microsoft's support site.

What it does

OR(logical1, [logical2], ...)

OR(logical1, [logical2], …) returns TRUE if at least one considered value is true, otherwise FALSE. It accepts up to 255 arguments. Numeric zero is false; other numeric values are true.

=OR(FALSE,2>1) returns TRUE. An array or range is scanned as a collection of values and the result is one logical value, rather than a separate result for every position.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Try =OR(FALSE,2>1), =OR(0,0) and =OR({0;1;0}). A range example needs actual input cells: enter B2 and B3 in the input-cell editor, then calculate =OR(B2:B3).

Quirks

Microsoft documents that text and empty cells in a referenced range or array are ignored. If there is no logical or numeric value to consider, OR returns #VALUE!. An all-ignored scan is different from considering one or more false values.

Do not assume OR is a programming-language short-circuit operator. A true value does not by itself establish that an error or an expensive expression elsewhere in the call is skipped. Text supplied directly as an argument also needs its own coercion checks; the rule about text in a range is not a universal rule about text.

How to implement

Track both an accumulated truth value and whether any eligible item has been seen. Classify direct arguments and referenced or array-contained values according to their distinct coercion rules. Fold eligible values into the accumulator, preserving the required error behaviour. After a successful scan, return #VALUE! if none were eligible, otherwise return the logical accumulator.

Share the item classifier with AND and XOR so that blank, text and error policies cannot drift. A fast exit on TRUE is valid only if it preserves argument evaluation and error ordering for the target Excel build. Test that separately from the truth table.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

OR · 1 lines · calc-func/src/catalogue/logical.rs on GitHub
logicals(OR, "OR", 255, or)
or · 7 lines · calc-func/src/catalogue/logical.rs on GitHub
/// OR: TRUE when a logical read is TRUE, FALSE when every one is FALSE.
fn or(
    arguments: &[CalcValue],
    services: &mut EvalServices<'_>,
) -> Result<CalcValue, FunctionFault> {
    decide(OR, arguments, services, |tally| tally.trues > 0)
}

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded1,212

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,212 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

AND requires every considered value to be true. XOR tests whether an odd number are true. Use IF to select between calculations. For elementwise logic in an array, ordinary comparisons or MAP may express the intended shape more directly.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents