IF with OR formula for multiple logical tests.

 How to use IF with OR function..?

In our previous post IF with AND formula for multiple logical tests is explained with the example. In this post we can understand if with or formula. Instead of using AND function, we can use OR function for testing multiple logical tests to give the results.

OR Function:

In OR logic, different logical test can be done. This function will check all conditions and returns TRUE if any condition is correct and FALSE if all of the logical test fails.

IF with OR formula

In above example it will check whether  B5 is greater than 1 , B6 is greater than 2 and B7 is greater than 3. If any one or more conditions are correct it will give the result TRUE.

This OR function can be used with IF to get the customized result instead of TRUE of FALSE. When IF function is used the result can be a constant, a cell reference or a formula result.

Syntax for IF with OR formula:

=IF(OR(LOGICAL1,LOGICAL2),OUTPUT IF TRUE,OUTPUT IF FALSE)
IF with OR formula

In OR function you can give up to 256 logical tests.

Using if with or formula:

This combination of IF OR formula is explained with one example.

In this example the marks obtained by the student in 6 subject is checked. After checking marks, result is given whether Pass or Fail

If the student obtains 40 or more marks in each subject and the total marks obtained is 300 or more then the result is Pass.

If the student obtains less than 40 marks in any of the subject and total is less than 300 then the result is Fail.

To check this following IF and OR function combined formula is used.

IF with OR formula

The formula will check marks of all 6 subject and also the total marks with OR function and it will check whether the marks is less than 40 in any subject. If result is true the formula will give the output of Fail, else it will give the output of Pass.

If you find any difficulty in applying this formula, you can comment.

Leave a Comment