Explanation of the OR function

The OR function accepts up to 255 logical conditions as shown below, with each argument separated by a comma.

  1. logical1
  2. logical2… all the way up to [logical255]

How the function works

At least 1 of your arguments (no matter how many you provide) must evaluate as TRUE in order for the OR function to return a result of TRUE. It doesn’t matter how many of your logical conditions evaluate as TRUE as long as 1 of them is TRUE.

If every argument is FALSE, the entire function is FALSE.

The function evaluates each of your logical conditions starting with the 1st condition, AND the next, AND the next, AND so on until it evaluates the last logical condition to determine if at least 1 of them is TRUE.

OR function_1

Using the OR function on its own

If you use the function on its own, it will generate a TRUE or FALSE result depending on the logical conditions you provide.

In order for the result below to be TRUE at least 1 of the following conditions must be TRUE:

  • The Yield has to be greater than or equal to 8%
  • The Price has to be less than or equal to $15

OR function example_1

Using the OR function within an IF statement

We will stick with the same example but now when our logical tests evaluate as TRUE or FALSE, we can instruct our IF statement to perform a specific action.

  • IF the dividend Yield is greater than or equal to 8% ORĀ the price is less than or equal to $15
  • Then “Buy Shares”
  • Or else “Ignore”

OR function example_2


Go back to Excel Tutorials.