OR Function - Excel
Overview
The OR function in Excel is a useful tool for checking multiple conditions in a formula. You can test up to 255 unique conditions using this function and it checks if at least one of the specified conditions are met, returning TRUE if it is, and FALSE if all the condition fails. This function can also be included in other functions.
Example:
=OR(C2>10, D2="Hello")
Syntax:
=OR(logical1, [logical2], ...)
logical1
, logical2
, ...: These are the logical values or expressions that you want to test. You can include up to 255 conditions separated by commas.
TRUE Example
In this example, the OR function gives a TRUE result because at least one of the two conditions are TRUE. The first condition checks if C2 is greater than 10, and since C2 is 12, this condition is true. The second condition checks if D2 contains the word "Hello" and it does not in this case. Since at least one of the conditions are true, the function returns TRUE.
FALSE Example
In this example, the OR function gives a FALSE result because both conditions are not fulfilled. The first condition checks if C2 is greater than 10, and since C2 is 5, this condition is not true. The second condition checks if D2 contains the word "Hello" and it does not in this case. Since both conditions are not true, the function returns FALSE.
Nested Example
In this example, I'll demonstrate how the OR function can be used within another function. We included the OR function in our IF function. So, if the OR function is TRUE, our IF function will show "Yes". However, if the OR function is FALSE, our IF function will show "No".