OR Function

Used within another function to return true if at least one provided logical expression is true.

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

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")

Usage notes

  • OR can be used directly in a boolean column (checkbox, flag, star) or within another function—such as IF, SUMIF, COUNTIF, SUMIFS, and COUNTIFS
  • OR can be used directly in a boolean column (checkbox, flag, star) or 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 NumberIn Stock?StatusUnits Sold
1C001trueGreen78
2C002falseRed42
3C003trueYellow217
4C004trueYellow 

 

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

 

FormulaDescriptionResult
=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 TrackOn 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, return 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, view 100+ formulas, 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