Excel OR Function: Syntax, Examples and Tips

Part of the free Module 5: Excel Formulas and Functions · Function 68 of 105 · Full Excel course

The Excel OR function tests two or more conditions and returns TRUE when at least one of them is true; it returns FALSE only when every condition fails. Use OR in Excel inside IF, conditional formatting or validation rules whenever any one of several triggers should produce the same result, such as flagging an order that is either late or unpaid.

OR syntax

=OR(logical1, [logical2], ...)

Arguments

Argument Required Meaning
logical1 Required The first condition: a comparison (A2>0), a cell holding TRUE/FALSE, or a function returning a logical value.
logical2, … Optional Up to 254 further conditions. Any one being TRUE makes OR return TRUE.

Non-zero numbers count as TRUE and zero as FALSE. Text and empty cells are ignored; if nothing logical remains, OR returns #VALUE!.

Step-by-step example

A student passes if either Maths (B1) or Science (B2) is at least 40:

=OR(B1>=40, B2>=40)
  1. Excel evaluates B1>=40. With 35 in B1 that is FALSE.
  2. It evaluates B2>=40. With 62 in B2 that is TRUE.
  3. One condition is TRUE, so OR returns TRUE.

Practical use cases

1. Pass if any subject clears the bar

=IF(OR(C1>70, C2>70), "Pass", "Fail")

2. Match one of several text values

=IF(OR(A2="East", A2="West"), "Domestic", "Export")

3. Weekend check

=OR(WEEKDAY(A2)=1, WEEKDAY(A2)=7)

4. Highlight problem rows with conditional formatting

=OR($F2<TODAY(), $G2="Unpaid")

5. Either cell filled

=OR(NOT(ISBLANK(E1)), NOT(ISBLANK(E2)))

6. OR inside array formulas

=SUMPRODUCT(((A2:A100="East")+(A2:A100="West")>0)*D2:D100)

OR itself collapses an array to one result, so add the conditions instead: a sum greater than 0 means at least one was TRUE. This is how you get OR logic into SUMIFS-style calculations.

7. Combine with AND

=IF(AND(B2>=50, OR(C2="Full-time", C2="Contract")), "Eligible", "Not eligible")

Common mistakes and errors

  • #VALUE! – no argument is logical, for example OR(“East”, “West”). Write the comparisons: OR(A2=”East”, A2=”West”).
  • Testing the same cell against a list – OR(A2={“East”,”West”,”North”}) works in Excel 365; in older versions use ISNUMBER(MATCH(A2, {“East”,”West”,”North”}, 0)).
  • Expecting per-row results in arrays – OR returns one value for the whole array. Use addition of conditions inside SUMPRODUCT or FILTER.
  • Confusing OR with AND – OR is satisfied by any one condition; if all must hold, use AND.
  • Numbers stored as text – “40”>=40 is FALSE. Convert with VALUE first.

Tips and best practices

  • For long lists of acceptable values use ISNUMBER(MATCH(A2, list, 0)) instead of a dozen OR arguments; the list is then editable without touching the formula.
  • Add conditions inside array formulas ((cond1)+(cond2)>0) to get row-by-row OR logic in SUMPRODUCT or FILTER.
  • Combine AND and OR deliberately and use parentheses generously; AND(a, OR(b, c)) and OR(AND(a, b), c) mean different things.
  • Use OR in conditional formatting to flag rows that meet any warning condition with one rule.
  • Test edge cases (blank cells, zero, text numbers) because OR treats blanks as ignored, not as FALSE.

Related functions

Frequently asked questions

How many conditions can OR test?

Up to 255 logical arguments. For a long list of acceptable values, ISNUMBER(MATCH(…)) against a range is shorter and easier to maintain.

What is the difference between OR and AND?

OR returns TRUE if at least one condition is true. AND returns TRUE only if every condition is true. Both return FALSE otherwise.

Can OR be used with text?

Yes, through comparisons such as A2=”Excel”. OR cannot evaluate bare text; OR(“Excel”) returns #VALUE!.

Need a ready-made template? Browse 7,000+ Excel, Power BI and Google Sheets templates at NextGenTemplates.com.