OR

Test whether any of multiple conditions are TRUE in Excel

Logical
|
Excel All versions
|
Google Sheets Supported

Spreadsheet editor

Syntax

=OR(logical1, [logical2], ...) Returns: Boolean

Arguments

Argument Required Description
logical1 Yes The first condition or logical value to evaluate.
logical2 No Additional conditions or logical values to evaluate. You can include up to 255 arguments.

About

Use OR when you need to check if any condition in a list is TRUE. It returns TRUE when at least one argument is TRUE, and FALSE only when all arguments are FALSE. This makes OR perfect for creating flexible conditions in your formulas.

OR works great with IF to expand your logical tests. Instead of checking just one condition, you can test multiple scenarios at once. For instance, you might flag orders that are either overdue or over budget, or identify employees who qualify for a bonus through any of several criteria. You can nest up to 255 conditions in a single OR function.

For situations where you need all conditions to be TRUE instead of just one, check out AND. And when you need more complex logic with multiple outcomes, IFS might be a better fit.

Examples

Empty cells and zero values

See how OR treats empty cells and zero as FALSE. Change the amounts or the "Yes" text to watch the alert column update. Only actual values over 500 or "Yes" trigger a review.

Spreadsheet editor

Case-insensitive text matching

Watch how OR ignores text capitalization. The redundant formula checks for "yes", "Yes", and "YES" but gets the same result as the simple version. Try changing response cases to see they always match.

Spreadsheet editor

Combining OR with AND

Use OR and AND together for complex logic. Projects are approved if both budget and timeline are OK, or if there's an executive override. Change the Yes/No values to see how the approval logic updates.

Spreadsheet editor

Watch out for

Empty cells treated as FALSE

OR treats empty cells as FALSE, which can produce unexpected results if you're checking for blank cells as a condition.

Use ISBLANK to explicitly test for empty cells: =OR(ISBLANK(A1), A1>100)

Text comparisons are case-insensitive

OR(A1="yes", A1="Yes", A1="YES") is redundant because Excel doesn't distinguish case in logical comparisons.

Use a single comparison: =OR(A1="yes"). If you need case-sensitive matching, use EXACT instead.

Using OR without IF

OR by itself only returns TRUE or FALSE, which might not be the output you want to display to users.

Wrap OR in IF to return custom values: =IF(OR(conditions), "Yes", "No")

Confusing OR with addition

OR checks if any condition is TRUE, it doesn't count how many are TRUE. OR(TRUE, TRUE, TRUE) still returns just TRUE.

To count TRUE values, use addition instead: =(A1>10)+(B1<5)+(C1=100) or use COUNTIF for ranges.

Tips & notes

OR supports up to 255 arguments, but keeping your conditions under 10 makes formulas easier to read and troubleshoot.

You can mix different types of logical tests in a single OR function: comparisons (A1>100), function results (ISBLANK(B1)), and direct cell references.

When combining OR with AND, use parentheses carefully. =AND(OR(A1>10, B1>10), C1<5) checks if either A or B is high AND C is low.

Common questions

What's the difference between OR and XOR?

OR returns TRUE if any condition is TRUE, regardless of how many. XOR returns TRUE only when an odd number of conditions are TRUE (typically used when exactly one condition should be TRUE).

Can I use OR to check if a cell matches multiple values?

Yes! Use =OR(A1="Red", A1="Blue", A1="Green") to check if A1 contains any of those colors. For longer lists, consider using COUNTIF with a range instead.

Why does OR(0, FALSE, "") return FALSE?

All three values (0, FALSE, and empty text) evaluate to FALSE in logical tests. OR only returns TRUE when at least one argument is TRUE or a non-zero number.

Can I nest OR functions inside each other?

Yes, but it's rarely necessary since a single OR can handle up to 255 conditions. Nesting is more useful when combining OR with AND for complex logic like =AND(OR(condition1, condition2), OR(condition3, condition4)).

Practice this function

IF with OR

Intermediate

Flag high-priority orders (either > $10,000 OR customer is "VIP").