﻿ OR function - Office Support

# OR function

This article describes the formula syntax and usage of the OR function in Microsoft Excel. Use the OR function, one of the logical functions, to return a TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.

## Syntax

OR(logical1, [logical2], ...)

The OR function syntax has the following arguments:

• Logical1, logical2, ...    Logical1 is required, subsequent logical values are optional. 1 to 255 conditions you want to test that can be either TRUE or FALSE.

## Remarks

• The arguments must evaluate to logical values such as TRUE or FALSE, or in arrays or references that contain logical values.

• If an array or reference argument contains text or empty cells, those values are ignored.

• If the specified range contains no logical values, OR returns the #VALUE! error value.

• You can use an OR array formula to see if a value occurs in an array. To enter an array formula, press CTRL+SHIFT+ENTER.

## Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

 Formula Description Result =OR(TRUE) One argument is TRUE TRUE =OR(1+1=1,2+2=5) All arguments evaluate to FALSE FALSE =OR(TRUE,FALSE,TRUE) At least one argument is TRUE TRUE =IF(OR(1+1=1,2+2=5,5+5=10),"answer if true","answer if false") One of the OR arguments are true answer if true

## Related functions and examples

Applies To: Excel 2016, Excel 2010, Excel Starter, Excel 2013, Excel Online, Excel 2016 for Mac, Excel for Mac 2011, Excel 2007

﻿