The OR function returns TRUE if at least one of its logical tests is true, and FALSE only when every test is false. It lets you combine several conditions in one formula without writing nested IFs.
=OR(logical1, [logical2], …)What does OR do?
The OR function is a logical function that checks one or more conditions and tells you whether any of them are true. You give it tests such as A2>100 or B2="North", and it returns a single TRUE or FALSE. If even one test passes, the answer is TRUE; only when all tests fail do you get FALSE.
OR matters because real decisions rarely depend on one condition. A discount might apply if a customer is in the North region or has sales above 1,000. A student passes if their exam score is at least 50 or their coursework is at least 60. Without OR you would nest IF statements and quickly lose track of the logic.
A typical office situation is flagging orders for review. You want to highlight any order that is either late or over budget. With OR you write one formula that returns TRUE for those rows, then filter or apply conditional formatting. The formula stays short, readable, and easy to change when the rules evolve.
When to use OR
- Flag rows where any of several warning conditions is met, such as late delivery or low stock.
- Decide whether a customer qualifies for a discount based on region or spend.
- Check student results where passing requires a minimum exam score or coursework mark.
- Validate data entry when a value must match one of several acceptable codes.
- Combine with IF to return a label such as "Review" instead of plain TRUE or FALSE.
- Use inside conditional formatting to highlight cells that meet any one of several rules.
OR syntax
=OR(logical1, [logical2], …)| Argument | Required? | What to enter |
|---|---|---|
logical1 | Required | The first condition to test. It can be a comparison such as A2>100, a cell containing TRUE or FALSE, or a number where 0 means FALSE and any other number means TRUE. Example: A2>100. |
logical2 | Optional | Additional conditions to test. You can add up to 255 in modern Excel. OR returns TRUE if any one of them is true. Example: B2="North". |
What it returns: OR returns the logical value TRUE if at least one argument evaluates to TRUE. It returns FALSE only when every argument evaluates to FALSE. If an argument is text or an error that cannot be interpreted as a logical value, OR may return #VALUE! or pass the error through.
OR examples
1 Example 3: Student pass with OR
A student passes if their exam score is at least 50 or their coursework mark is at least 60. The formula =OR(B2>=50,C2>=60) tests both scores for the first student. The exam score is 45, which fails, but the coursework mark is 62, which passes, so OR returns TRUE. This shows how OR succeeds when only one of the conditions is met.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Student | Exam | Coursework | |||
| 2 | Amara | 45 | 62 | TRUE | ||
| 3 | Ben | 55 | 40 | |||
| 4 | Chloe | 38 | 55 | |||
| 5 | Diego | 70 | 30 | |||
| 6 |
2 Example 5: Discount eligibility with three conditions
A sales team offers a discount if a customer is in the North region, has spent at least 1,000, or has been a member for three or more years. The formula =OR(A2="North",B2>=1000,C2>=3) tests all three conditions for the first customer. The region is North, so OR returns TRUE immediately. For a customer outside the North with lower spend and fewer years, all three tests would fail and OR would return FALSE.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Customer | Region | Spend | Years | |||
| 2 | Acme | North | 800 | 2 | TRUE | ||
| 3 | Beta Ltd | South | 1200 | 1 | |||
| 4 | Gamma Co | East | 400 | 5 | |||
| 5 | Delta Inc | West | 300 | 1 | |||
| 6 |
Common OR errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | An argument is text that cannot be interpreted as a logical value, such as =OR("North",B2>100) where "North" is not a comparison. | Use a comparison that produces TRUE or FALSE, such as A2="North", instead of a bare text value. |
| #NAME? | The function name is misspelled, for example =ORR(A2>1,B2>1), or the Analysis ToolPak add-in is missing in very old Excel versions. | Check the spelling as OR. In modern Excel OR is built in; in legacy versions ensure required add-ins are enabled. |
| #VALUE! from empty cells | An argument refers to an empty cell in a context where OR expects a logical value, which can cause unexpected results or errors. | Wrap the test in a comparison such as A2>0 so an empty cell is treated as 0, or use IFERROR around the OR result. |
| Wrong TRUE/FALSE result | Using AND logic by mistake, or comparing text without quotes, such as A2=North instead of A2="North". | Remember OR needs only one true condition. Put text values in double quotes and test each condition separately. |
Tips for using OR
- Use OR when any one condition is enough; use AND when every condition must be true.
- Keep each test simple, such as
B2>100, and avoid combining OR with complex nested formulas until you are comfortable. - Wrap OR inside IF to return friendly labels:
=IF(OR(B2>1000,B2<100),"Review","OK"). - Remember OR stops at the first TRUE, so order conditions from most to least likely for slightly faster mental reading.
- Use OR inside conditional formatting to highlight rows that meet any of several rules.
- Test your formula on a row where all conditions are false to confirm it returns FALSE as expected.
Frequently asked questions
What is the difference between OR and AND in Excel?
OR returns TRUE if at least one condition is true. AND returns TRUE only if every condition is true. Use OR for "any of these" and AND for "all of these".
Can OR check more than two conditions?
Yes. You can add up to 255 conditions in modern Excel, separated by commas, for example =OR(A2>10,B2>10,C2>10).
Why does OR return TRUE when I expected FALSE?
At least one condition is evaluating to true. Check for text comparisons without quotes, numbers stored as text, or an empty cell being treated as 0.
Can I use OR with text values?
Yes, but each text test must be a comparison in quotes, such as A2="North". A bare text value like "North" on its own causes #VALUE!.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. OR reference