# How to Use Excel OR Function

Use of OR function:

Use OR function in Excel is to check one or more conditions at the same time. It returns TRUE if any of the logical argument evaluates to TRUE and FALSE when all of the supplied arguments returns FALSE.

Syntax:

=OR(logical1, [logical2], …)

Arguments:

• logical1 – It is the first logical argument to be evaluated to TRUE or
• [logical2] – (optional) The second logical argument or condition to evaluate.

• If a logical argument contains number, zero evaluates to FALSE and numbers other than 0 including negative values, evaluate to TRUE.
• Text values and empty cells supplied are ignored by the function.
• OR function can also be used with other built in Excel functions like IF function to be more effective.
• For an example, using with IF function, you can test multiple set of conditions at a time.
• =IF(OR(A1>10,A2<50),”Qualify”,”Not Qualify”)
• Each logical arguments must either evaluate to TRUE or FALSE, or be the arrays or logical value’s references.
• If logical argument does not find any logical values to be tested, function returns #VALUE error.
• A maximum of 255 logical arguments can be tested at the same time.

Examples – OR Function:

Example 1: Supplying / Referring Boolean Values in OR Function

In the above example, there is one argument which is TRUE out of 2 arguments hence the function returned the answer.

Note: TRUE and FALSE are the Boolean value and also represented by 1 and 0 respectively. So, if supplied as cell references, directly in the cell or in double quotes as text values, if any of the argument is evaluated to TRUE, the answer will return to TRUE and when all the arguments are either 0 or FALSE, the answer would be FALSE.

Example 2: Using logical expressions/conditions in argument of OR function

• Situation: Returns TRUE if Value 1 is greater than Value 2 and Value 2 is less than Value 3

In above example, OR function checked whether Value 1 is greater than Value 2 or Value 2 is less than Value 3. For 2 of the records out of 3 have at least 1 of the argument evaluating to TRUE, therefore it returns TRUE there and for 1 of the record, it found all of the arguments are returning FALSE, therefore it returns FALSE there.

In case you want some other output to be displayed instead of Boolean values (TRUE/FALSE), you can use IF function for the same.

Related Functions:

AND