OR Function

OR Function

OR Function

Returns TRUE when at least one logical test is TRUE.

ExcelClash Team
PUBLISHED

Summary

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.

Purpose

Allow any condition to pass

Use OR when one successful test is enough to make the whole formula return TRUE.

Return Value

TRUE or FALSE

Returns a logical result that can be used directly or inside formulas such as IF.

Syntax

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

Microsoft documents that OR accepts from 1 to 255 logical conditions. Each argument should evaluate to TRUE or FALSE.

Arguments

  • logical1 - [required] The first logical test.
  • logical2... - [optional] Additional logical tests.

These arguments can be direct logical values, comparisons such as A1>10, or references that already contain TRUE or FALSE.

OR vs Other Logical Functions

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.

Using OR

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.

Example 1 - Pass If Either Score Is High Enough

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.

Check Answer
Challenge #1
Target: Sheet1!F1
Any Passing Score

In cell F1, check whether B2 or C2 is at least 70.

Example 2 - Check Whether a Value Is Outside a Safe Range

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.

Check Answer
Challenge #2
Target: Sheet1!F2
Outside Range

In cell F2, check whether B2 is less than 10 or greater than 20.

Example 3 - Trigger an Alert If Any Item Fails

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.

Check Answer
Challenge #3
Target: Sheet1!F3
Any Error

In cell F3, check whether any of B2, C2, or D2 equals "Error".

Example 4 - Compare One Result Against Multiple Targets

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.

Check Answer
Challenge #4
Target: Sheet1!F4
Either Target

In cell F4, check whether B2 meets either G2 or H2.

Conclusion Recap

  • Summary: OR returns TRUE when at least one test is TRUE.
  • Best use: It is ideal when one passing condition is enough.
  • Common pattern: Out-of-range checks such as "below this or above that."
  • Range behavior: Text and blanks inside array or reference arguments are ignored.
  • Error note: If a referenced range contains no logical values, OR returns #VALUE!.
  • Practical pairing: Combine OR with IF to turn logic into a label or decision.
Tactical Arena
Select Scenario:
Share OR Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.