The OR function in Excel
OR returns TRUE if at least one of its conditions is true, and FALSE only when all of them fail. Use it for rules with "either" in them: escalate a ticket if it's high priority or has been open more than a week. Like AND, it's most useful inside IF, where it turns several checks into one decision.
Syntax
=OR(logical1, [logical2], ...)
| logical1 | The first condition to check, like B2="High" or C2>7. |
|---|---|
| logical2, ... | Optional. More conditions, up to 255. OR returns TRUE as soon as any one of them is TRUE. |
Try it yourself
This is a live spreadsheet. Type the formula and press Enter.
Orders need a manual review if the value is over 1000 or the customer pays by "Invoice". In F2, use OR to return TRUE or FALSE using the value in C2 and the payment method in D2.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Review? | ||||||
| 2 | UK | ||||||
| 3 | JP | ||||||
| 4 | IT | ||||||
| 5 | US | ||||||
| 6 | AE | ||||||
| 7 | |||||||
| 8 | |||||||
| 9 |
Tip: One condition compares the value with 1000, the other compares the payment method with a word in quotes.
Examples
=OR(B2="High",C2>7)→ TRUET-201 has only been open a day, but it's high priority. One true condition is enough, so OR returns TRUE.
=IF(OR(B3="High",D3="Enterprise",C3>7),"Escalate","Normal")→ "Escalate"Three escalation rules in one test. T-202 is low priority for a standard customer, but it's been open 9 days, so it gets escalated.
=OR(E5="Open",E5="Pending")→ FALSEChecks one cell against two allowed values. T-204 is Closed, so neither matches and OR returns FALSE.
Example data
| 1 | Ticket | Priority | Days open | Customer tier | Status |
|---|---|---|---|---|---|
| 2 | T-201 | High | 1 | Standard | Open |
| 3 | T-202 | Low | 9 | Standard | Open |
| 4 | T-203 | Medium | 2 | Enterprise | Pending |
| 5 | T-204 | Low | 3 | Standard | Closed |
Common mistakes
Leaving out the cell on the second value
=OR(E5="Open","Pending")returns #VALUE!, because "Pending" on its own isn't a TRUE/FALSE test. Repeat the cell each time:OR(E5="Open",E5="Pending").Using OR when every condition must be true
OR is satisfied by just one condition. If the rule says "and" or "both", use AND, or the formula will flag far too many rows.
Using OR on whole columns in FILTER
OR(B2:B9="High",C2:C9>7)gives a single TRUE/FALSE for the whole range. In FILTER and SUMPRODUCT, add the tests instead:(B2:B9="High")+(C2:C9>7).
FAQ
How do I check if a cell equals one of several values?+
List each comparison: =OR(A2="Open",A2="Pending"). In Microsoft 365 you can also write =OR(A2={"Open","Pending"}).
Can I combine AND and OR in one formula?+
Yes, nest them: =AND(B2="High",OR(C2>3,D2="Enterprise")) needs high priority plus at least one of the other two conditions.
What's the difference between OR and XOR?+
OR returns TRUE if any condition is true. XOR returns TRUE only when an odd number of conditions are true, so with two conditions it means "one or the other, but not both".
Lesson
Master OR step by step: AND, OR and NOT
Check several conditions at once with AND and OR, flip a result with NOT, and combine them inside IF.