# Excel OR Function

Just like the AND function, the OR is a logical function in Excel. The OR function returns True if any of the given condition(s) are True. It only returns False if all the given conditions evaluate as False.

**What is Excel OR Function?**

- Just like the Excel AND function, the OR is a logical function in Excel.
- The OR function returns
**True**if any of the given condition(s) is True. - It only returns
**False**if all the given conditions are evaluated as False.

**The syntax for using the OR function**

The syntax for using the OR function is:

- You may separate multiple conditions by a comma.
- Up to 255 conditions can be used in a single OR formula.

For example,

=OR(A2>10)

=OR(A2>10, B2<100)

=OR(A2<=5, B2>=100, C2=20)

See the examples below to learn how we can use the OR function. The example also includes using the OR with the IF function (which is also a logical function).

**The example of OR with a single condition**

In the first example, I am using a single condition only in the OR function. For that, we have a value in the A2 cell that is used in the OR function.

The B2 cell shows the returned value by OR.

Similarly, other A column cells are used for different results; all with a single condition:

The formulas for different B cells are:

B2: =OR(A2>5) B3: =OR(A3<=10) B4: =OR(A4=15) B5: =OR(A5="test")

You can see the output in the above examples. Also, notice the usage of text in the OR function and the returned result.

**Using multiple conditions example**

For this example, I used two or more conditions in the OR function. To make it understand how it works, various combinations of True/False returned results are used as follows:

The formulas for C column (C2 to C4):

C2: =OR(A2>5, B2<15) C3: =OR(A3=-10,B3>20) C4: =OR(A4=15,B4=-5,A2>=10)

You can see that the returned result is False for only that formula for which all conditions are False. That is the C2 cell’s formula.

In that case, neither A2 is greater than 5 nor B2 is less than 15.

In other cases, even if one condition is True, the OR function returns the True.

**An example of using the OR with IF function**

An example below shows the usage of the OR function with IF.

- For that, we have an Excel sheet that contains the records of “Number of Sales” and “Sale amount” by the Sales Persons.
- A salesperson is eligible for the bonus only if the number of sales is greater than or equal to 50.
- Similarly, if the sales amount is greater than $10,000, he/she is eligible for the bonus even if the number of sales is less than 50.

See how IF/OR functions are used to get the results:

The formula used in the D2 cell to get the result for salesperson 1:

To get the result for other salespersons, just replace the B2 and C2 cells with their respective cells.

**How to use ribbon for creating OR formula?**

Rather than writing the formula in the formula bar yourself, you may also provide OR function arguments by accessing the menu in the ribbon.

**To access the OR function:**

**Step 1:**

Select a cell where you want to apply the formula and

Go to the “**Formulas**” in the ribbon

**Step 2:**

Locate the “**Logical**” group and click on the “**OR**” as shown below:

The “**Function Arguments**” popup comes up where you may enter up to 255 conditions that you want to test.

Enter the condition(s) as shown below:

You can see the result as you are entering the conditions.