Excel OR Function

OR Function in Excel

OR function in excel is used to test different conditions in the meantime. This logical function helps you in comparing two values or statements in excel. It will return TRUE, if at least any one of the arguments or conditions evaluates as TRUE. Similarly, it will also return FASLE, if all the arguments or conditions are FALSE.


Or syntax

The OR function accepts the following parameters and arguments:

  • Logical1– Required. This is referred to as a condition for testing that can be either TRUE or FALSE.
  • Logical2, …Logical_n – [Optional]. Conditions for testing can either be TRUE or FALSE. There can be a total of 255 conditions (in modern Excel versions).
  • Return Value: The return value will be TRUE if any of the arguments are true; otherwise, the return value will be FALSE.


You can download this OR Function Excel Template here – OR Function Excel Template

Example #1

When the OR formula is written is =OR(A1<10, A1=40)

Result: FALSE

You can see the excel spreadsheet below:

Excel OR Function Example 1

Example #2

When the formula is written is =OR(A1=45, A2=“Google”)

Result: TRUE

Consider the Excel spreadsheet below:

Excel OR Function Example 2

Example #3

When the OR formula written is =OR(A1>=5,A1=25,A2= “e2esols.com”)

Result: TRUE

Look at the spreadsheet below to understand the above example.

Excel OR Function Example 3

In Combination with the AND and IF function

499Data Error=IF(OR(A2<50,A3<>75,A4>=100),”Data Error”,”Data Correct”)
5Data Correct=IF(AND(A2<50,A3<>75,A4>=100),”Data Error”,”Data Correct”)

The AND and OR functions are the well-known logical functions of spreadsheets, and what these two functions do is a test to see whether the result from at least two target cells meets conditions that you determine. These functions will only return one of the two results, which you can also call Boolean values: TRUE or FALSE.

  • For the OR function – row 2 above – various conditions are tested, and if any of the tested conditions are valid, at that point, the OR function return value is TRUE. Just if all conditions are not genuine, will OR give you FALSE return value.
  • For the AND Function – row 3 above – different conditions are tested, and just if the majority of the conditions are genuine, will the function give a return value TRUE. If not, the function returns FALSE as the return value.

The OR and AND function can be combined with other functions such as the IF function. In the above example, you can see the rows four and five have been combined with the IF function to get various results.

Things to Remember

  • The OR is a logical function that is used to test two or more conditions or arguments simultaneously.
  • The return value OR function is either TRUE or FALSE.
  • The return value depends on the arguments which you input in the OR formula.
  • There can be a total of 255 conditions or arguments to be tested at the same time through OR Excel function.
  • OR function can be combined with other logical functions such as AND or IF.

Recommended Articles

This has been a guide to OR Function in Excel. Here we discuss the OR Formula in excel and how to use OR function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *