Advertisements

Excel OR Function

Excel OR Function returns TRUE if any given arguments are TRUE, and returns FALSE if all the arguments are FALSE. For example, to test the value in C6 for greater than 80 OR equal to 90, users use =OR(C6>80, C6=90). Users can use the OR function as the logical test inside the IF Function, and inside the AND function.

In this section:

Advertisements

  1. Syntax of OR Function
  2. If X Or Y is TRUE, the OR function returns TRUE
  3. IF with OR
  4. OR Function with AND Function
  5. AND Function inside the OR Function
  6. OR Function with and Array

Excel OR Function

1. Syntax of OR Function:

=OR (logical1, [logical2], …)

where:

2. If X Or Y is TRUE, the OR function returns TRUE:

We want to test whether Math score is more than 80, OR the statistics score is equal to 90. If either of the conditions is TRUE, OR function will return TRUE; otherwise it returns FALSE.

Excel OR Function to evaluate TRUE or FALSE if one condition is TRUE.

3. If with OR:

In this example, we combine OR function with IF function. The formula is =IF(OR(D6>80, E6>80), “Pass”, “Fail”), which returns “Pass” if a student’s score either in Math or Statistics is more than 80.

4. OR Function inside AND:

We can combine OR function with AND Function. The formula in our example is =AND(D6>80, OR(E6=”Distinction”, E6=”Excellent”)), which returns TRUE if a student’s score in Math>80, and has either Distinction or Excellent in Statistics.

Excel OR Function

5. AND Function inside OR Function:

Advertisements

We can also use AND Function inside OR function. The formula is =OR(AND(D6>=80, E6>80), AND(D6>=80, F6>=80)), which returns TRUE if anyone of the AND condition meets.

Excel OR Function

6. Array formula with OR function:

In the following example, the formula {=OR(D:F11)>=95} returns TRUE if any value within the array D6:F11 is more than or equal to 95. To form the array formula, press CTRL+SHIFT+ENTER. Once users press CTRL+SHIFT+ENTER, excel adds curly braces {}.

More readings:

  1. MS Office post of OR Function
  2. Excel AND Function
  3. Excel IF Function
  4. Excel NOT Function
  5. Excel IFERROR Function
  6. Excel IFNA Function

14 Responses

  1. Greetings from Idaho! I’m bored at work so I decided to browse your site on my iphone during lunch break. I enjoy the information you present here and can’t wait to take a look when I get home. I’m amazed at how fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G .. Anyways, fantastic blog!

  2. Greetings! This is my first comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading through your blog posts. Can you suggest any other blogs/websites/forums that deal with the same subjects? Many thanks!

  3. I’m not certain the place you’re getting your info, however great topic. I needs to spend some time studying more or figuring out more. Thanks for great information I used to be in search of this info for my mission.

Leave a Reply

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

Advertisements