Excel OR function
The OR function in Excel is used to test multiple conditions at the same time, if any one of the conditions is met, a TRUE is returned, if none of the conditions is met, a FALSE is returned. The OR function can be used in combination with the AND and IF functions together.
Syntax:
The syntax for the OR function in Excel is:
Arguments:
- Logical1: Required. The first condition or logical value that you want to test.
- Logical2: Optional. The second condition or logical value to evaluate.
Notes:
- 1. The arguments must be logical values such as TRUE or FALSE, or in arrays or references that contain logical values.
- 2. If the specified range contains no logical values, OR function returns the #VALUE! error value.
- 3. In Excel 2007 and later versions, you can enter up to 255 conditions, in Excel 2003, only handle up to 30 conditions.
Return:
Test multiple conditions, return TRUE if any one of arguments is met, if not, return FALSE.
Examples:
Example 1: Use OR function only
Let’s take the below data for example:
Formula | Result | Description |
Cell C4: =OR(A4,B4) | TRUE | Displays TRUE because the first argument is true. |
Cell C5: =OR(A5>60,B5<20) | FALSE | Displays FALSE because both criteria do not match. |
Cell C6: =OR(2+5=6,20-10=10,2*5=12) | TRUE | Displays TRUE because the condition “20-10” is matching. |
Example 2: Use OR and AND functions together in one formula
In Excel, you may need to combine the AND and OR function together for solving some problems, there are some basic patterns as follows:
- =AND(OR(Cond1, Cond2), Cond3)
- =AND(OR(Cond1, Cond2), OR(Cond3, Cond4)
- =OR(AND(Cond1, Cond2), Cond3)
- =OR(AND(Cond1,Cond2), AND(Cond3,Cond4))
For example, if you want to know the Product which are KTE and KTO, the order of KTE is greater than 150, and the order of KTO is greater than 200.
Please use this formula, and then drag the fill handle to the cells you want to apply this formula, and you will get the result as below screenshot shown:
Example 3: Use OR and IF functions together in one formula
This example helps you to understand the combination of OR and IF functions. For example, you have a table contains the students’ test score, if one of the subjects is greater than 60, the student will pass the final exam, otherwise, fail the exam. See screenshot:
To check if the student passes the exam or not, using the IF and OR functions together to solve it, please use this formula:
This formula indicates that, it will return Pass, if any a value in column B or column C is equal or greater than 60. Otherwise, the formula returns Fail. See screenshot:
Click for knowing more about IF function…
Example 4: Use OR function as array form
If we you OR as an array formula, you can test all values in a specific range against a given condition.
For example, if you want to check if there are values in a range are greater than 1500, please use the below array formula, and then press Ctrl +Shift + Enter keys together, it will return TRUE if any cell in A1:C8 is greater than 1500, otherwise, FALSE is returned. See screenshot:
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
