The Excel function OR is a logical operator that evaluates multiple conditions simultaneously. It determines if at least one of the provided arguments is TRUE, making it a valuable tool for decision-making within spreadsheets. When incorporated into formulas, this function can significantly enhance the complexity of criteria for calculations and conditional formatting.
Syntax
OR(logical1, [logical2], ...)
- logical1: The first condition to evaluate. This is required.
- logical2: An additional condition to evaluate. This is optional and can be repeated for multiple arguments.
Example #1
OR(A1>10, B1<5)
In this case, if cell A1 contains 12 and cell B1 contains 3, the result will be TRUE since A1 is greater than 10.
Example #2
OR(C1="Yes", D1="No")
Here, if C1 has the value "Yes" and D1 has the value "Maybe", the function will return TRUE, as at least one condition is met.
Example #3
OR(E1="Complete", F1="Pending")
If E1 equals "In Progress" and F1 equals "Pending", this will yield TRUE since the second condition is satisfied.
Error handling
- VALUE!: This error occurs when the logical arguments provided are of an invalid type, such as non-numeric values when a comparison is expected.
- NAME?: This suggests that the function name was typed incorrectly or is not recognized by Excel.