# Excel Logical Function And, Or, Not & XOR

In this article we are going to learn logical function of Excel. Along with we will define and give examples of each logical function.

Microsoft Excel we know offer a lot of function, and one of these are logical functions which the purpose is to perform a comparison of data along with logical operations.

## What are Logical Function in Excel?

Microsoft Excel has four logical functions which can work with logical values. These functions are utilized to handle more than one comparison of values, or formulas that require one or more conditions. As well as logical operators, Excel logical functions return either TRUE or FALSE when their arguments are evaluated.

These are AND, OR, XOR, and NOT. So there is the following summary of these logical functions to help you choose the right formula for a specific task.

## Excel AND Logical function

The AND function of Excel comes in very handy which makes it most popular among the logical functions family. It’s used to test and meets several conditions to ensure all of them are met.

So, the AND function is for testing the specified conditions and if the evaluated condition is all TRUE then it will return TRUE otherwise it will return FALSE.

The syntax of this function is shown below:

`=AND(logical1, [logical2], …)`

The first argument of this syntax is required while the succeeding logical conditions are optional. Technically the logical condition to test can be evaluated as either TRUE or FALSE.

And now, let’s examine the formula examples that indicate how to use the AND functions in Excel formulas.

And now we will use this formula and the following steps you can consider as follows.

Step 1:  Prepare your numeric data in your worksheet which we will use AND function and see how it works.

Step 2: Enter this formula in a cell you select and with two conditions here.

`=AND(B2>C2, A2="Andrie")`

Step 3: Hit Enter to see what result we will get with the condition we input.

Hence, if it returns FALSE the first condition does not meet the first condition which B2 is greater than to C2 value. Where in we mention already AND function requires all conditions to be TRUE.

Step 4: And now, let us use again the AND function and apply it to another row of data. Below is the formula you will try with its single argument.

`=AND(B3<=88, C3<=90)`

Step 5: Hit the Enter key again and you will see the result, it returns TRUE as both conditions are evaluated as TRUE.

## OR function in Excel

The Excel OR function is a basic logical function that is used to evaluate statements or values. The only difference of this to AND function is if at least one statement is True it will return TRUE otherwise it will return FALSE or if all the arguments are FALSE.
Additionally, this function is available in the 2016 – 200 Excel version.

The syntax of this function is as follows:

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

In the same manner, the logical arguments’ test could either be TRUE or FALSE. Wherein the first argument is required and the subsequent are optional, which can up to 255 conditions in modern excel versions.

And now, let’s write down a few formulas for you to get a feel for how the OR function in Excel works.

## Excel XOR function

Microsoft 2013 introduced this function XOR which is the exclusive OR function. So if you have any knowledge of programming languages you may encounter and familiar with this function. Meanwhile for those who are not and do not have any prior engagement with this function, the explanation below will give you an idea of how this function works.

The XOR syntax is given below:

=`XOR(logical1, [logical2],…)`

Where the first logical1 argument is required, the rest argument is optional. Luckily you can have up to 254 conditions you can test in just a single formula.

In simple understanding XOR function consists of two logical statements that return the following:

• FALSE if all arguments are TRUE or neither is TRUE.
• TRUE if at least one argument evaluates to TRUE.

This might be simple to understand from the formula examples:

Now we will try this formula in our worksheet to test the logical test.

## NOT function in Excel

This NOT function in Excel is one of the simplest function, as well as its syntax.

=`NOT(logical)`

The arguments of this function reverse the value. In simple words, if the logical evaluates to TRUE the Not function will reverse it and return to FALSE, and vice versa.

## Conclusion

In conclusion, logical functions in excel are helpful in worksheets especially when a formula required conditions that should be evaluated as TRUE or FALSE.