In this lesson we will learn how the OR function works in Excel. The OR function is used when you want to check multiple conditions. It returns TRUE if any one of the conditions evaluate to TRUE, else it returns FALSE (Note: it returns FALSE even if one condition is FALSE).

=OR(logical1, [logical2],…)

**logical1 –**This is the first condition, you want to evaluate for TRUE or FALSE.**[logical2]**– Second and rest conditions are optional, that you want to evaluate for TRUE or FALSE.

Let’s understand with a simple example. In below table Price has been mentioned as 5 in cell A2 and 55 in cell A3. We have used OR function in cell B2 with 2 conditions as follows.

=OR(A2>10,A3<30)

- The first condition returns FALSE as A2=5 and 5 is not greater than 10.
- The second condition also returns FALSE as A3=55 and 55 is not less than 30.

Hence the result of OR function is FALSE.

In below example Price has been mentioned as 35 in cell A2. We have used OR function in cell B2 with 2 conditions as follows.

=OR(A2>10,A2<30)

- The first condition returns TRUE as 35 is greater than 10.
- The second condition returns FALSE as 35 is not less than 30.

Hence the result of OR function is TRUE.

#### Notes :

- OR function can be used with other formulas like, in an IF Function, we can test a condition and then specify a value when it’s TRUE and a value when it is FALSE. Using OR function within IF enables users to check multiple conditions at one go.
- For example, if you have to test whether A1 is greater than 20 or A2 is less than 200, here is how you can do it in an IF function:

=IF(OR(A1>20,A2<200),”Approve”,”Reject”)

- For example, if you have to test whether A1 is greater than 20 or A2 is less than 200, here is how you can do it in an IF function:

- The arguments must either evaluate to logical values (TRUE/FALSE), or must be arrays/references of logical values.
- Maximum of 255 conditions can be tested in a single OR function.
- If the specified range contains no logical value, the OR function returns #VALUE! error.
- Text & empty cells are ignored.

You can check here to know how the OR function works in Google Sheet.

You can check here to understand how the AND function works in Excel.

You can check here to understand how the AND function works in Google Sheet.

You can check here to understand how the NOT function works in Google Sheet.

You can check here to understand how the NOT function works in Excel.