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 first row of the In Stock column is equal to 0 (un-checked/false); or, the first row of the Status column 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 second row of the Units Sold column is greater than 50; or, the In Stock column 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, and 4 apply. 

3

Still need help?

Use the Formula Handbook template to find more support resources, and view 100+ formulas, including a glossary of every function that you can practice working with in real time, and examples of commonly used and advanced formulas.

Find examples of how other Smartsheet customers use this function or ask about your specific use case in the Smartsheet online Community.

Ask the Community