## How to use the OR function

*Article updated on March 17, 2018*

The above picture shows OR function examples in column D. If the value in column B is equal to a condition or a value on the same row in column C is above a specific number the OR function returns TRUE.

Row 4 has a matching value and the OR function returns TRUE, row 6 has a number greater than 10 in column C so the OR function returns TRUE.

### Excel function syntax

OR(logical1, [logical2])

The OR function allows you to carry out a logical test in each argument and if at least one argument returns TRUE the OR function returns TRUE. If all arguments return FALSE the OR function also returns FALSE.

### Arguments

logical1 - Required. A logical expression or a function/functions that returns a number.

[logical2] - Optional. Also a logical expression or a function/functions that returns a number. You can have up to 254 arguments.

### Comments

The OR function arguments can result in TRUE or FALSE, however, it also treats all numbers, both positive and negative, as TRUE.

The exception to that is 0 (zero) which is treated the same as FALSE.

### OR function - multiple conditions

The array formula in cell C3 performs two logical tests, if the value in cell B3 is equal to cell B11 or B12 and returns FALSE. Both values are not equal to the value in cell B3.

The technique used in column C that compares a value to multiple values using a cell range instead of declaring each logical expression in an argument each saves you time and effort. The downside is that you need to enter the formula as an array formula.

To enter the formula above as an array formula, type the formula in a cell. Press and hold CTRL + SHIFT keys simultaneously, then press Enter once. Release all keys.

The formula is now enclosed with curly brackets, they indicate you successfully entered the formula as an array formula. Don't enter the curly brackets yourself.

### Download excel *.xlsx file

### Articles with the 'OR' Function

The following 5 articles have formulas that contain the OR function.

### Functions in 'Logical'

The OR function function is one of many functions in the 'Logical' category.