OR

Using the Excel OR Function

Summary

The OR function is another of Excel's logical functions and returns TRUE when any conditions of a test are true. Likewise, it will return FALSE if any conditions of the test are false. The OR function can be used to expand the functionality of other logical functions such as AND and IF. Using OR as the logical_test argument in a function such as IF allows you to test more than one condition at a single time.

Syntax

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

Syntax Breakdown

logical1
The logical1 argument is required and consists of the first condition that you are testing that can be evaluated to either TRUE or FALSE.

logical2
The logical2 argument is optional and consists of the other conditions that you are testing that can be evaluated to either TRUE or FALSE. The OR function can accept up to 255 logical conditions.


Usage Notes

The OR function allows you to test multiple conditions that evaluate to either TRUE or FALSE. For example, if you wanted to test if some user provided values are over 50 we could use the following formula:

Excel OR Test

OR Errors
If no logical values are passed to the AND function, then the #VALUE! error will be returned.

OR Error Example

Ignored Values
If text values or input from blank cells are passed to OR as an argument they will be ignored.

Arrays With OR
The OR function can be used with array formulas to determine if a specified value is found in an array. To enter an array formula use:

CTRL + SHIFT + ENTER