
The Excel OR function returns TRUE when at least one logical test is TRUE. It returns FALSE only when every test is FALSE.
OR is useful when a formula should pass if any one condition is met. Common examples include qualification checks, alert rules, out-of-range tests, and flexible approval logic where there can be more than one valid path.
Use OR when one successful test is enough to make the whole formula return TRUE.
Returns a logical result that can be used directly or inside formulas such as IF.
=OR(logical1, [logical2], ...)
Microsoft documents that OR accepts from 1 to 255 logical conditions. Each argument should evaluate to TRUE or FALSE.
These arguments can be direct logical values, comparisons such as A1>10, or references that already contain TRUE or FALSE.
OR is one of the main building blocks for flexible decision rules.
| Function | Main Idea | Returns TRUE When | Best Use |
|---|---|---|---|
OR |
Any condition may pass | At least one test is TRUE | Flexible pass conditions |
AND |
All conditions must pass | Every test is TRUE | Strict requirements |
XOR |
Exclusive or odd-parity test | An odd number of tests are TRUE | Mutually exclusive logic |
NOT |
Reverse a result | The original logical value is FALSE | Inverting a condition |
If your rule says "any one of these is enough," OR is usually the right function. If your rule says "all of these must happen," that is usually an AND formula instead.
OR is often used inside IF when a model needs multiple success paths. For example, a record may qualify if it meets score A or score B, or an alert may trigger if any one sensor reports an error. OR keeps that kind of logic much clearer than stacking many nested IF statements.
OR is also useful for boundary checks. If a number should stay inside a safe range, OR can test the opposite condition by checking whether the value is below the lower limit or above the upper limit. That makes it a common choice for validation and alert formulas.
Microsoft notes that if an array or reference argument contains text or empty cells, those values are ignored. But if the specified range contains no logical values at all, OR returns #VALUE!. That mainly matters when you use OR on wider ranges or mixed data.
This example returns TRUE when at least one of the two scores reaches the target.
=OR(B2>=70,C2>=70)
This is useful when a model allows more than one route to success instead of requiring every condition to pass.
In cell F1, check whether B2 or C2 is at least 70.
OR is a clear way to detect when a number falls outside allowed limits.
=OR(B2<10,B2>20)
This returns TRUE when the value is too low or too high. It is a common validation pattern for stock levels, measurements, and threshold checks.
In cell F2, check whether B2 is less than 10 or greater than 20.
Some warnings should appear as soon as one item in a group fails.
=OR(B2="Error",C2="Error",D2="Error")
This returns TRUE if any one of the listed cells contains "Error". It works well for alert flags and review checks.
In cell F3, check whether any of B2, C2, or D2 equals "Error".
OR can also compare a result against more than one benchmark.
=OR(B2>=G2,B2>=H2)
This returns TRUE when the result meets either target. It is useful when the workbook allows alternative thresholds or fallback goals.
In cell F4, check whether B2 meets either G2 or H2.
OR returns TRUE when at least one test is TRUE.#VALUE!.IF to turn logic into a label or decision.Tell your friends about this post