First
The first logical value or array of logical values.
Other
Additional logical values or arrays of logical values.
Returns
TRUE if, and only if, one or more parameters are TRUE and FALSE otherwise.
Returns TRUE if one or more values are TRUE and FALSE otherwise. OR (FALSE, FALSE, FALSE) OR (FALSE; FALSE; FALSE) returns FALSE, as not a single parameter is TRUE, but OR (FALSE, TRUE, FALSE) OR (FALSE; TRUE; FALSE) returns TRUE.
Use OR, AND, NOT and XOR in conjunction with IF to express logical conditions.
This formula returns 2 if Value1 is 20 or Value2 is 40, and 4 otherwise:
The formula can also be written using the || operator (which is not commonly supported by spreadsheets):
|| is written between the values to test, instead of before them, which can make formulas easier to read.
Examples
Returns 2 only if Value1 is 20 or Value2 is 40. Otherwise, 4 is returned.
Returns 2 only if Value1 is 20 or Value2 is 40. Otherwise, 4 is returned. This example uses the || operator, which is not commonly supported by spreadsheets, instead of the OR function.
Returns TRUE, because at least one element of the array is TRUE.
Returns FALSE, because no array element is TRUE.
Returns TRUE, because the third parameter is TRUE.