WEBcnx 2023.2 is out now bringing with it a host of new features and performance enhancements. Read more.

Open navigation

OR Function

Applies from Version:WEBcnx 2024.1Applies to Version:


Description

Use the OR function, one of the logical functions, to determine if any conditions in a test are TRUE.


Technical Details

The OR function returns TRUE if any of its arguments evaluate to TRUE, and returns FALSE if all of its arguments evaluate to FALSE.


One common use for the OR function is to expand the usefulness of other functions that perform logical tests. For example, the IF function performs a logical test and then returns one value if the test evaluates to TRUE and another value if the test evaluates to FALSE. By using the OR function as the logical_test argument of the IF function, you can test many different conditions instead of just one.


Syntax

OR(logical1, [logical2], ...)


The OR function syntax has the following arguments:

ArgumentDescription
Logical1Required. The first condition that you want to test that can evaluate to either TRUE or FALSE.
Logical2,
...
Optional. Additional conditions that you want to test that can evaluate to either TRUE or FALSE, up to a maximum of 255 conditions.

Returns

A Boolean.


Remarks

  • The arguments must evaluate to logical values such as TRUE or FALSE, or in arrays or references that contain logical values.
  • If an array or reference argument contains text or empty cells, those values are ignored.
  • If the specified range contains no logical values, OR returns the #VALUE! error value.
  • You can use an OR array formula to see if a value occurs in an array. To enter an array formula, press CTRL+SHIFT+ENTER.


Example

FormulaDescriptionResult
OR(TRUE, TRUE)All arguments are TRUETRUE
OR(TRUE, FALSE)One Argument is FalseTRUE
OR(1=1, 2=2, 3=3)All arguments are TRUETRUE
OR(1=2, 2=3, 3=4)All arguments are FALSEFALSE


Further Reading

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

You may like to read -