OR function comes under the LOGICAL FUNCTIONS category in Excel.
OR function is very important and is going to be used a lot which makes it one of the very important functions in excel.
It simply behaves like the binary OR.
It checks if ANY OF THE CONDITIONS are TRUE OR NOT.
IT returns TRUE if ANY OF THE CONDITIONS ARE TRUE and false , if ALL of the conditions is FALSE.
PURPOSE OF OR IN EXCEL
OR FUNCTION RETURNS TRUE IF ANY OF THE CONDITIONS ARE TRUE AND FALSE IF ALL OF THE GIVEN CONDITIONS ARE FALSE.
PREREQUISITES TO LEARN OR
THERE ARE A FEW PREREQUISITES WHICH WILL ENABLE YOU TO UNDERSTAND THIS FUNCTION IN A BETTER WAY.
- Some information about the BINARY MATHEMATICS is an advantage for the use of such formulas.
- Basic understanding of how to use a formula or function.
- Basic understanding of rows and columns in Excel.
- Of course, Excel software.
Helpful links for the prerequisites mentioned above
What Excel does? How to use formula in Excel?
SYNTAX: OR FUNCTION
The Syntax for the function is
=OR(CONDITION 1, CONDITION 2, CONDITION 3, …… SO ON)
CONDITION1 Any condition (e.g. if any cell>12)
CONDITION2 Any condition (if any cell <45)
Atleast TWO CONDITIONS are needed. At the most, any number of conditions can be used.
EXAMPLE:OR FUNCTION IN EXCEL
Suppose we have a cell which contains a number. Suppose we are trying to make a group of the people with ages <20 and greater than 50. For this case, we can use OR function as we have to select the person when either of the conditions is true.
STEPS TO USE OR
The example has 8 persons with ages given in the next column.
We are checking if the age is fulfilling the requirement for the selection which is, the age needs to be less than 20 or greater than 50
The formula is used as
for the PERSON 1 and goes like this. for person 8 it is
The cell number is the cell which contains the age of a particular person.
BINARY MATHEMATICS have just two number-0 and 1.Its just like the DECIMAL SYSTEM which we use in day to day life which has ten numbers 0 to 9.So OR is known as the BINARY ADDITION. As we can understand easily that0+0=01+0=10+1=11+1=1where 1 is TRUE and 0 is false.Same goes in this function. When any of the conditions are true, we get TRUE result.
DIFFERENCES: AND vs OR
AND is binary multiplication whereas OR is binary addition.AND needs all the conditions true to give TRUE as result.OR needs any of the condition true to give TRUE as result.