OR Function

Used within another function to return true if at least one provided logical expression is true.
Sample Usage
IF(OR([Due Date]1 > [Due Date]2, [Due Date]1 > [Due Date]3), "Due Date 1 isn't the smallest", "Due Date 1 is the smallest")
Syntax
OR(
  • logical_expression1
  • [
    • logical_expression2
    • ...
    ]
)
  • logical_expression1
    An expression that evaluates to either true or false (boolean).
    • logical_expression2
    • ...
    —[optional]
    Additional expressions that evaluate to true or false.
Usage Notes
  • OR can be used directly in a boolean column (checkbox, flag, star) or can be used within another function—such as IF, SUMIF, COUNTIF, SUMIFS, and COUNTIFS.
  • OR can be used directly in a boolean column (checkbox, flag, star) or can be used within an IF function.
  • OR can also be used in conjunction with @cell, in the criterion of other functions such as SUMIF, COUNTIF, SUMIFS, and COUNTIFS.
Examples

This example references the following sheet information:

Row #

Item Number

In Stock?

Status

Units Sold

1

C001

true

Green

78

2

C002

false

Red

42

3

C003

true

Yellow

217

4

C004

true

Yellow

 

 

Given the table above, here are some examples of using an OR() function in a sheet:

 

Formula

Description

Result

=IF(OR([In Stock?]1 = 0, Status1 = "RED"), "Check Order Status and Stock", "On Track")

IF the “In Stock” column row 1 is equal to 0 (un-checked/false), OR, the “Status” column row 1 is “Red”, return the value "Check Order Status and Stock", if not return the value "On Track".

On Track

=IF(OR([Units Sold]2 > 50, [In Stock?]2 = 0), "Out Of Stock", "In Stock")

IF the “Units Sold” column row 2 is greater than 50, OR, the “In Stock” column row 2 equals 0, return the value “Out Of Stock”, if not “In Stock”.  

Out Of Stock

=COUNTIF(Status1:Status4, OR(@cell = "Green", @cell = "Yellow"))

Count the number of values in the “Status” column if Green or Yellow are returned at the cell level. Rows 1, 3, & 4 apply. 

3