OR

The OR function evaluates two conditions and returns the logical value True if either of them is true, or the logical value False otherwise.

Syntax

OR(
    <condition1>,
    <condition2>
)

Parameters
  • condition1: First condition to evaluate.
  • condition2: Second condition to evaluate.
Returned value

The OR function returns a Boolean (True or False).

Additional Information

This function only accepts two arguments (two conditions to evaluate). If you want to evaluate more than two conditions, you can resort to nesting some OR functions or, preferably, use the OR operator (||) -see example below-.

Examples

In this first example we want to evaluate that the product is "D" or that the sale price is greater than or equal to € 2,000.

OR function. Example of use

In this other example we want to evaluate three conditions: that the product is "D", that the price is equal to or greater than € 2,000 or that the month in which the sale occurred was December, for which two OR functions are nested:

OR function. Example of use

An alternative is to use the OR operator, which makes the expression simpler:

OR operator. Example of use

Related functions
Category
Logical
Submitted by admin on Mon, 12/03/2018 - 23:19