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.
Formula in cell D3:
The picture above shows the formula in column D, it returns TRUE in cell D3, D4 and D5 because the amount is below 10.
Excel function syntax
Required. A logical expression that returns a logical value or a number.
Optional. You can have up to 254 additional arguments.
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.
This extensive function reference list provides detailed information including syntax, arguments, return values, and examples for many of the functions used in Excel formulas. Click on headers to sort table.
Articles with the 'OR' Function
The following 5 articles have formulas that contain the OR function.