Function Reference: OR

Syntax
=OR(logical1,[logical2]...[logical255])
Purpose / Description
Returns TRUE if any one of the values passed to the function is TRUE or non-zero.
Arguments
Name Type Description
logical1 any A constant, constant array, reference or nested expression that returns a value to be checked together with any other arguments.  If a range reference or nested expression is used, it may return more than one value in each argument.  Text strings are ignored.
[logical2]...[logical255] any Optional constants, constant arrays, references or nested expressions returning one more additional values for checking.  If a range reference or nested expression is used, it may return more than one value in each argument.  Text strings are ignored.
Return Values
Type Specific Value Description
logical TRUE If any one values passed is TRUE or non-zero
logical FALSE If all of the values are FALSE or zero.
error #VALUE! If all the values passed are text strings.
error   Any errors referenced by arguments are returned due to propagation of error values.
Notes / Comments / Advice / Warnings
Note: This function accepts range references that span worksheets in each of its arguments.
Note: This function cannot be used in an array formula to do row-by-row or column-by-column evaluation.  All referenced values are evaluated in a single step.
Comment: The OR function is optimised, and will return TRUE as soon as it encounters a TRUE or non-zero value.  So it is worth considering the order in which conditions are listed.
Advice: If "or" logic is required in a dynamic array formula, use the sum of comparison approach whereby each condition or set of conditions is summed with each other.  This approach is demonstrated in our courses and online examples.
Examples: Open / download sample workbook: AND, OR, XOR, NOT.xlsx