OR function

OR returns TRUE if any supplied logical expression evaluates to TRUE; otherwise it returns FALSE, handling arrays and single values alike.

=OR(logical1, ...)

Generate a OR formula

Describe what you need. The generator will reach for OR where OR is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How OR reads its arguments
logical1requiredOR
ArgumentRequiredDescription
logical1RequiredThe first logical test; can be a Boolean, a comparison, or a range that evaluates to Booleans. Non-numeric, non-Boolean text causes #VALUE!.
...RepeatingAdditional logical tests, each following the same rules as logical1; you may supply up to 255 arguments, and they may be single values or arrays.

Returns

A single Boolean value (TRUE or FALSE) as a scalar.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Detect any overspend in the budget

CategoryMonthBudgetedActualVariance
GroceriesJanuary50055050
UtilitiesJanuary150140-10
EntertainmentJanuary200180-20
GroceriesFebruary500480-20
UtilitiesFebruary15016010
=OR(D2:D6>C2:C6)

Result: TRUE

The comparison D2:D6>C2:C6 creates an array of TRUE/FALSE values: {TRUE,FALSE,FALSE,TRUE,FALSE}. OR then scans this array and returns TRUE as soon as it sees a TRUE, indicating at least one month exceeded its budget.

2. Check for severe underspend (variance < -20)

CategoryMonthBudgetedActualVariance
GroceriesJanuary50055050
UtilitiesJanuary150140-10
EntertainmentJanuary200180-20
GroceriesFebruary500480-20
UtilitiesFebruary15016010
=OR(E2:E6<-20)

Result: FALSE

Each variance is compared to -20, producing {FALSE,FALSE,FALSE,FALSE,FALSE}. Because none of the rows meet the condition, OR finds no TRUE value and therefore returns FALSE, signalling that no severe underspend occurred.

3. Find a January overspend or a February underspend

CategoryMonthBudgetedActualVariance
GroceriesJanuary50055050
UtilitiesJanuary150140-10
EntertainmentJanuary200180-20
GroceriesFebruary500480-20
UtilitiesFebruary15016010
=OR((B2:B6="January")*(D2:D6>C2:C6), (B2:B6="February")*(D2:D6<C2:C6))

Result: TRUE

The first part tests "January" rows for overspend, yielding {TRUE,FALSE,FALSE,0,0}. The second part tests "February" rows for underspend, yielding {0,0,0,TRUE,FALSE}. Multiplication acts as logical AND. OR sees at least one TRUE in the combined array and returns TRUE.

Common errors

Which OR error are you seeing?
OR returned an error#VALUE!
Compare the text to something (e.g., =OR("Hello"="Hello",TRUE)) or wrap it in ISNUMBER/ISTEXT to produce a Boolean.
#N/A
Wrap the lookup with IFNA or IFERROR to supply FALSE when the lookup fails, e.g., =OR(IFNA(VLOOKUP(...),FALSE)).
#REF!
Update the formula to reference a valid range or restore the missing cells.
ErrorWhy it happensHow to fix it
#VALUE!A direct text argument like "Hello" cannot be coerced to a logical value, so OR raises #VALUE!.Compare the text to something (e.g., =OR("Hello"="Hello",TRUE)) or wrap it in ISNUMBER/ISTEXT to produce a Boolean.
#N/AAn argument that evaluates to #N/A, such as a failing VLOOKUP, propagates through OR because no TRUE can be determined.Wrap the lookup with IFNA or IFERROR to supply FALSE when the lookup fails, e.g., =OR(IFNA(VLOOKUP(...),FALSE)).
#REF!A range reference that points to deleted or invalid cells (e.g., =OR(A1:Z1) after column B is removed) triggers #REF!.Update the formula to reference a valid range or restore the missing cells.

Tips and when to use something else

  • Use OR when you only need to know if at least one condition is met; for counting how many are true, prefer COUNTIF or SUMPRODUCT.
  • Wrap OR with NOT to create NAND logic, useful for rejecting a set of possibilities.
  • In large sheets, replace OR with SUM(--condition)>0 for slightly better performance in Google Sheets.
  • If you merely need to test for existence, consider FILTER+ROWS instead of OR for clearer intent.

Frequently asked questions

Does OR treat empty cells as FALSE?
Yes. Blank cells are coerced to FALSE, so they never cause OR to return TRUE. If all other arguments are FALSE, the overall result will be FALSE.
Can OR be used with whole-column references?
Both Excel and Google Sheets accept whole-column ranges, but evaluating an entire column can slow calculations. OR will scan every cell and return TRUE if any meet the condition, otherwise FALSE.
What happens when some arguments are errors and others are FALSE?
If no argument evaluates to TRUE, OR returns the first error it encounters. This behavior ensures that hidden problems aren't silently ignored when the logical outcome would otherwise be FALSE.
How does OR handle array arguments differently in Excel versus Google Sheets?
Excel’s dynamic-array engine evaluates arrays natively, while older versions required Ctrl+Shift+Enter. Google Sheets automatically expands arrays. In both platforms the final Boolean result is the same: TRUE if any element is TRUE.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17