-
logical_expression1
- [
]
- logical_expression2
- ...
- logical_expression1—An expression that evaluates to either true or false (boolean)
- —[optional]
- logical_expression2
- ...
Additional expressions that evaluate to true or false
- 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
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 Smartsheet Formula Template to view examples and practice working with functions in real-time.
Find examples of how other Smartsheet customers use this function or ask about your specific use case in the Smartsheet online Community.