How to use logical functions in excel
There are basically 5 types of logical functions available in excel which are mostly used in day-to-day life. These functions are as mentioned below:
You can read about the IF function from the link Here. I will be explaining the use of the rest four functions.
AND function is used to evaluate a condition where we wanted to check if all conditions are true or not. It will throw true or false based on all conditions matched or not. Let us see the syntax of AND function in excel
The syntax is very simple just use conditions in logical values. Let us understand this with an example.
In the above example, we have two different values and we wanted to check these values against some other values. As we defined earlier if all conditions are met then it will throw TRUE else FALSE. In the first condition, we see both values are met as per conditions given so it throws TRUE while in the next example 2nd condition 56>60 is not correct due to which it throws FALSE.
OR function in excel also works like AND function but it gives TRUE even if a single condition met or FALSE when all conditions are not met. Syntax of OR function is similar to AND function. Let us understand it by example.
In the above example, we used three scenarios first has all conditions met so it throws TRUE, second has one condition met, and another not met so it again throws TRUE as at least one condition met. Lastly, in the third scenario, no conditions were met so it throws FALSE.
NOT function in excel works a little differently as compared to AND & OR function. The main function of the NOT function is to reverse the outcome of any logic. Let’s suppose if any condition is met then the NOT function will provide FALSE as an output. We can see the below example to understand this.
In this example we are testing a scenario if 35 is greater than 56 which actually is FALSE but as we used NOT function so it gives us TRUE as output.
XOR function in excel is also known as exclusive OR function and its syntax is similar to OR function. It gives us output as as TRUE when either conditions is TRUE and FALSE when all conditions are true or neither is TRUE. Let us understand it by the below example.
In the above example we have tested three scenarios. In the first scenario output is FALSE as both conditions met as per criteria,while in the second scenario the output is TRUE because no conditions were met. Lastly in the third scenario output is FLASE as neither of the condition is met.
It is important to note here that these functions work mostly with IF function. Individually these functions also works but but vastly used as nested function with IF.
That is all for now will meet again with something new in next article.
You also can read more on logical functions from the below links.