Logical function

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], ...)
ArgumentWhat it means
logical1RequiredThe first condition, or a range of TRUE/FALSE values.
logical2, ...OptionalMore 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

D2fx=OR(B2="Yes", C2>=200)
ABCD
1CustomerMemberOrder total
2KayaNo250TRUE
3LuisYes40
4MiraNo85

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?

D3fx=IF(OR(C3="Sick", C3="Holiday"), "Away", "At work")
ABCD
1EmployeeTeamStatus
2DimitraSalesIn
3ErikITSickAway
4FionaHRHoliday

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?

D2fx=OR(B2:B5>30)
ABCD
1InvoiceDays overdue
2INV-71012TRUE
3INV-71145
4INV-7123
5INV-71320

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.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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 repeating B2= 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.

Recipes that use OR