OR
Test whether any of multiple conditions are TRUE in Excel
Spreadsheet editor
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
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
Spreadsheet editor
Case-insensitive text matching
Spreadsheet editor
Combining OR with AND
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
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.