OR function

This article describes the formula syntax and usage of the OR function in Microsoft Excel.

Description

Returns 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

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



Was this information helpful?

Yes No

How can we improve it?

255 characters remaining

To protect your privacy, please do not include contact information in your feedback. Review our privacy policy.

Thank you for your feedback!

Support resources

Change language