The Excel OR Function

Related Function:
AND Function

Basic Description

The Excel OR function tests a number of supplied conditions and returns either:


The syntax of the function is:

OR( logical_test1, [logical_test2], ... )

where the logical_test arguments are one or more conditions that evaluate to either TRUE or FALSE.

You can enter up to 255 conditions to the Excel Or function in current versions of Excel (Excel 2007 and later), but in Excel 2003, the function can only handle up to 30 arguments.

Excel Or Function Examples

The following spreadsheets show three examples of the Excel Or function.

1510=OR( A1>0, A1<B1 )
2510=OR( A2>0, A2>B2, B2>12 )
3510=OR( A3<0, A3>B3, B3>12 )

In the above examples:

Further examples of the Excel Or function are provided on the Microsoft Office website.

Or Function Error

The most common error from the Excel Or Function is the #VALUE! error:

Common Error

Occurs if any of the supplied logical_test arguments are text values.

(Note that, if the logical_tests return numbers, instead of logical values, zero is treated as the logical value FALSE all non-zero numbers are treated as the logical value TRUE).