### Excel OR Function

This Excel Tutorial demonstrates how to use the Excel OR Function in Excel to test if one or more criteria is true, with formula examples.

## OR Function Description:

The OR Function Checks whether any conditions are met. Returns TRUE or FALSE.

## Formula Examples: Example Formula Result
No Conditions Met =OR(C5 > 5,D5 > 5) False
One Condition Met =OR(C6 > 5,D6 > 5) True
Two Conditions Met =OR(C7 > 5,D7 > 5) True
Text – Conditions Met =OR(C8 =”apples”,D8 > 5) True
Text <> Equal =OR(C9 <>“pears”,D9 < 5) True

## Syntax and Arguments:

The Syntax for the OR Formula is:

### Function Arguments ( Inputs ):

logical1 – Logical expressions. Example: A1 > 4.

Use the OR Function to test if one or more conditions are met. Each condition must be a logical expression (ex: a1 >5), a reference to a cell containing TRUE or FALSE, or an array containing all logical values. If one or more conditions are TRUE, the formula returns TRUE, otherwise it returns FALSE.

OR is a logical function and is generally used in conjunction with another logical function, IF:
The IF Formula does one thing if a condition is TRUE and does another if a condition is FALSE. Often when using the OR Function you will “nest” it within an IF Function.

You may also want to use these other logical functions:
AND Formulas test if all conditions are met.
XOR Formulas test if one and only one condition are met.

## OR Examples in VBA You can also use the OR function in VBA. Type:
`Application.Worksheetfunction.Or(logical1,logical2)`
For the function arguments, you can either enter them directly into the function, or define variables to use instead.

`=AND(`  