OR function
Returns TRUE if at least one of the conditions is TRUE, and FALSE only when all of them are FALSE.
Available in All versions of Excel
In every Excel versionWorks in Google Sheets
Syntax
OR(logical1, [logical2], ...)| Argument | What it means | |
|---|---|---|
logical1 | Required | The first condition, or a range of TRUE/FALSE values. |
logical2, ... | Optional | More conditions, up to 255 arguments. |
Returns: TRUE if any condition is TRUE, otherwise FALSE.
How OR works
OR is the "any of these will do" test. It returns TRUE as soon as one of its conditions holds, and FALSE only when every condition fails. Typical rules: free delivery for members or for orders over 200; mark an employee as away if the status is Sick or Holiday; flag an account if any invoice is more than 30 days overdue.
Like AND, OR is usually placed inside IF to turn TRUE/FALSE into a label or a calculation. In ranges it skips text and empty cells and treats numbers as TRUE (non-zero) or FALSE (zero); if there is no logical value at all it returns #VALUE!.
OR can also test a whole range against one condition, such as OR(B2:B5>30). In Microsoft 365 and Excel 2021 that works as an ordinary formula; in older versions it must be confirmed as an array formula with Ctrl+Shift+Enter.
Examples
1Free shipping for members or large orders
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Customer | Member | Order total | |
| 2 | Kaya | No | 250 | TRUE |
| 3 | Luis | Yes | 40 | |
| 4 | Mira | No | 85 |
Result: TRUE
Kaya is not a member, but her order of 250 meets the second condition, so OR returns TRUE. Mira fails both and gets FALSE.
2Who is away today?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Employee | Team | Status | |
| 2 | Dimitra | Sales | In | |
| 3 | Erik | IT | Sick | Away |
| 4 | Fiona | HR | Holiday |
Result: Away
Erik's status matches the first condition, so OR is TRUE and IF shows Away. Dimitra matches neither and shows At work.
3Is any invoice more than 30 days overdue?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice | Days overdue | ||
| 2 | INV-710 | 12 | TRUE | |
| 3 | INV-711 | 45 | ||
| 4 | INV-712 | 3 | ||
| 5 | INV-713 | 20 |
Result: TRUE
The comparison checks every cell; INV-711 at 45 days is over 30, so the answer is TRUE. In Excel 2019 and earlier confirm with Ctrl+Shift+Enter.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | The arguments contain no logical values, e.g. a range of text. | Use comparisons such as B2:B5="Yes" instead of the raw text range. |
Tips
- To test one cell against many values,
OR(B2={"Sick","Holiday","Leave"})is shorter than repeatingB2=each time. - In FILTER or SUMPRODUCT use
+between conditions for a row-by-row OR:FILTER(A2:C9, (C2:C9="Sick")+(C2:C9="Holiday")). OR itself would return one value for the whole range. - Use XOR when you need "exactly one of two", not "at least one".
Questions
Can I combine OR and AND?
Yes: =AND(B2>=100, OR(C2="East", C2="West")) means at least 100 and in either East or West.
Why does OR return one value in my FILTER formula?
OR always summarises everything into a single TRUE or FALSE. For row-by-row conditions in array formulas, add the conditions together instead.
Google Sheets
OR also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
OR in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | NEBO |
| Danish | ELLER |
| Dutch | OF |
| Finnish | TAI |
| French | OU |
| German | ODER |
| Hungarian | VAGY |
| Italian | O |
| Norwegian (Bokmål) | ELLER |
| Polish | LUB |
| Portuguese (Brazil) | OU |
| Portuguese (Portugal) | OU |
| Russian | ИЛИ |
| Spanish | O |
| Swedish | ELLER |
| Turkish | YADA |
Recipes that use OR
- How to check if a cell contains a word in Excel
- How to use conditional formatting with a formula in Excel
- How to use IF with multiple conditions in Excel