Excel OR Function
OR tests multiple conditions and returns TRUE if any one of them is true, FALSE only if they're all false.
OR checks two or more conditions and returns TRUE if at least one of them is true. It only returns FALSE when every single condition fails. On its own, OR just spits out TRUE or FALSE in a cell; the real value comes from pairing it with IF, where it becomes the logic engine behind "if this or that" decisions.
Syntax
=OR(logical1, [logical2], ...)
| Parameter | Required | Description |
|---|---|---|
logical1 | Yes | The first condition to test. Something that resolves to TRUE or FALSE, like B2="East" or C2>500. |
logical2, ... | No | Additional conditions. OR accepts up to 255 total and stops evaluating as soon as one comes back TRUE. |
A "logical value" in Excel is just TRUE or FALSE, the result of a comparison like A2="Sales".
Basic Example
You're reviewing an orders list and want to flag any order shipping to the East or West region for expedited handling.
=OR(B2="East", B2="West")
// B2="East" = first condition
// B2="West" = second condition
If B2 contains "West", the first comparison is FALSE and the second is TRUE. Since only one condition needs to pass, OR returns TRUE. Change B2 to "North" and both comparisons fail, so OR returns FALSE.
How OR Works
It stops at the first TRUE
OR doesn't need every argument to be true, and it doesn't check all of them once one passes. =OR(1=2, 3=3, 5=6) returns TRUE the moment it hits 3=3, regardless of what comes after.
Text comparisons are case-insensitive
OR(A2="sales", A2="marketing") treats "Sales" and "sales" as identical. If your data relies on case to distinguish two entries, wrap each argument in EXACT instead: OR(EXACT(A2,"Sales"), EXACT(A2,"sales")).
Numbers and blanks aren't treated like text
If an argument is a number, 0 evaluates to FALSE and any other number, including negatives, evaluates to TRUE. Blank cells behave differently depending on how you reference them. Wrap a blank cell in a comparison, like C2>0, and it evaluates normally: a blank C2 is treated as 0, so the comparison returns a real FALSE. Pass a blank cell in bare, with no comparison at all, and OR ignores it entirely instead of evaluating it. If every argument is a bare blank reference, OR has nothing left to evaluate and returns a #VALUE! error instead of FALSE.
It caps out at 255 arguments
You can pack up to 255 conditions into a single OR, with a combined character length under 8,192. In practice you'll rarely hit that ceiling, but stacking dozens of manual equality checks is usually a sign you should use a lookup instead. More on that below.
For a long list of acceptable values, skip the manual chain. =OR(B2={"East","West","North"}) checks B2 against an array in one shot and is easier to read than five separate B2="..." comparisons.
Common Use Cases
Flagging records with IF and OR
You want a status column that marks an order "Review" if the payment method is "Check" or "Wire", since both require manual approval.
=IF(OR(C2="Check", C2="Wire"), "Review", "Approved")
If either condition is true, the cell shows "Review." If neither matches, it shows "Approved."
Nesting OR inside AND for compound rules
A bonus applies only if the employee is in Sales, and their region is either East or West.
=IF(AND(B2="Sales", OR(C2="East", C2="West")), "Bonus", "")
// B2="Sales" = department check
// OR(C2="East", C2="West") = either region qualifies
AND requires both the department match and the OR result to be true before the bonus applies. Swap in NOT if you need to exclude a case instead: AND(B2="Sales", NOT(C2="North")).
Highlighting rows with conditional formatting
You want to highlight any row where Status is "Late" or "Cancelled" without touching the data itself. In the conditional formatting rule, use a formula:
=OR($D2="Late", $D2="Cancelled")
Lock the column with $ so the rule checks column D on every row as you drag it across the range, but let the row number shift.
Restricting entries with data validation
You want a cell to only accept "Yes" or "No", typed in any case. In Data Validation, choose Custom and enter:
=OR(A1="Yes", A1="No")
Excel blocks any entry that doesn't match one of the two, and thanks to OR's case-insensitivity, "yes", "Yes", and "YES" all pass.
Handling Errors
OR returns a #VALUE! error when none of its arguments can be evaluated as TRUE or FALSE. This is different from returning FALSE. FALSE means the conditions were checked and failed; #VALUE! means Excel couldn't check them at all.
Common causes of #VALUE!:
- An argument references plain text instead of a comparison, like
OR(A2)where A2 holds the word "Pending" rather than a test such asA2="Pending" - Every argument is a bare blank cell reference, with no comparison operator, leaving OR with nothing to evaluate
- A broken comparison, like a stray quotation mark, that turns the condition into unparseable text
A blank cell wrapped in a comparison doesn't trigger this. OR(C2>0) evaluates normally and returns FALSE if C2 is empty, since the comparison converts the blank to 0 first. The #VALUE! risk is specific to bare references with no comparison operator at all.
=IFERROR(IF(OR(A2="Yes", A2="Y"), "Confirmed", "Pending"), "Check entry")
Wrapping the entire IF(OR(...)) formula, rather than OR alone, matters here: that way a bad reference anywhere in the logic gets caught, and the fallback value stays distinct from a real TRUE or FALSE result. If the fallback were just FALSE, you'd have no way to tell a genuine "no" result apart from a formula that silently failed. "Check entry" flags the row for a human instead of hiding the problem.
Notes & Gotchas
What does the OR function do in Excel?
OR tests two or more conditions and returns TRUE if any of them is true. It returns FALSE only when every condition fails. It's one of Excel's four core logical functions, alongside AND, NOT, and XOR.
How do you use the OR function with IF in Excel?
Nest OR inside the logical test argument of IF: IF(OR(condition1, condition2), value_if_true, value_if_false). IF checks the result OR returns and picks the matching branch. This is the standard pattern for "this or that" logic, like flagging an order if the region is East or the amount exceeds a threshold.
What is the difference between AND, OR, and NOT functions in Excel?
AND requires every condition to be true. OR requires only one. NOT reverses a single result, turning TRUE into FALSE and back again. They're often combined, such as AND(B2="Sales", OR(C2="East", C2="West")) to require one fixed condition plus a choice between two others.
How many conditions can the OR function test in Excel?
OR accepts up to 255 arguments in modern Excel versions, with a combined length under 8,192 characters. Older versions (2003 and earlier) cap out at 30 arguments and 1,024 characters. You'll almost never approach either limit in normal use.
How do you write an IF OR statement in Excel?
Put the OR test inside IF's first argument, then define what happens for TRUE and FALSE: =IF(OR(A2="Red", A2="Green"), "Match", "No match"). Always fill in a value for the false branch. Leave it out, and Excel doesn't leave the cell blank; it prints the word FALSE.
If you skip value_if_false in IF(OR(...)), Excel doesn't leave the cell empty when the condition fails. It shows the literal word FALSE. Always supply "" or a real fallback value if you want a blank result.
Why does a long chain of OR conditions feel slow?
Each manual equality check inside OR is evaluated individually, so a formula with fifteen or twenty A2="..." comparisons does add real overhead across a large sheet. For lists of acceptable values, OR(A2={"East","West","North","South"}) or a MATCH-based lookup runs faster and reads cleaner than the same logic spelled out condition by condition.
Related Functions
| Function | Use this when... |
|---|---|
IF | You want to return a specific value based on the result of OR, rather than just TRUE or FALSE. |
AND | You need every condition to be true instead of just one. |
Related Functions
Excel AND Function
AND is the logical glue behind most multi-condition IF formulas. Learn how it evaluates conditions, where it silently breaks, and when to pair it with OR instead.
Excel IF Function
IF is the function behind almost every conditional formula in Excel — pass or fail, over or under budget, yes or no. Here's how to write one that works on the first try.
Excel IFERROR Function
IFERROR replaces ugly error codes like #N/A and #DIV/0! with a value you choose. It's simple to use, but it catches every error type — including the ones you didn't mean to hide.
Excel ISBLANK Function
ISBLANK tells you whether a cell has absolutely nothing in it, not just whether it looks empty. Here's how it works, where it gets tricked, and what to use instead when it doesn't do what you expect.