How to use OR function in Microsoft Excel

In this article, we will learn how to use OR function in Excel.

OR function in Excel runs a basic logical function to test two values or statements. OR function checks if any of the condition in formula is True, returns True and it returns False only if all condition or statements are False.

Syntax:

=OR(logical1, [logical2], [logical3], …)

OR function can be used via many ways.
Let’s understand them one by one

Here we have some coloured balls and we need to test the condition to check whether the ball is valid or not.

80
Use the formula in B2 cell.

=OR(A2=”Red”,A2=”White”)

Explanation:
Function checks either Red ball or White ball is valid for the match to be played.
So it checks the cell A2 for the same.
81
As it returns False means it doesn’t have either Red or White.

Use the Ctrl + D option to check the cells corresponding to it.
82
As we can see in the above snapshot it returns True for the cells having Red or White coloured ball.

You can apply it to check on the range of cells to test whether any of the cell returns True or not.

Use the formula

=OR(A2:A10=”Red”,A2:A10=”White”)

Note: Don’t forget to use Ctrl + shift + Enter to get the result. Curly brackets will be visible in the function box (fx) of the cell.
83
Use Ctrl + Shift + Enter to see the result
84
It returns True. It means that A2:A10 range cells have either White or Red ball.

You can check less than or greater than condition on numbers. OR function can also be used along with many function like IF, AND and many more.

Hope you understood how to use OR function in Excel. Explore more articles on logic_test functions here. Feel free to state your queries in the comment box below.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Google PlusVisit Us On Youtube