Microsoft Excel provides logical
functions (like XOR & NOT Functions) to work with logical values. These
functions are XOR & NOT. We can use these functions when we want to carry
out more than one comparison in our formula or test multiple conditions instead
of just one. As well as logical operators, Microsoft Excel logical functions
return either TRUE or FALSE when their arguments are evaluated.
The Microsoft Excel XOR function
is the most popular member of the logical functions of the family. It comes in handy
when we have to test multiple conditions and make sure that either (Odd) of
them are met. Technically, the XOR function tests the conditions we specify and
returns TRUE if either (Odd not even) of the conditions evaluate to TRUE,
otherwise, it returns to FALSE.
As well as XOR, the Microsoft
Excel NOT function is another basic logical function that is used to in
Excel to reverse the value of its argument. In other words, if logical evaluates
to FALSE, the NOT function returns TRUE and vice versa.
Purpose:
To Compare or Test the values
& return either TRUE or FALSE when their arguments are evaluated.
Syntax of XOR & NOT Functions:
The syntax of XOR & NOT Functions
in Excel are as follows;
- =XOR(logical1, [logical2],…)
- =NOT(logical)
Return value:
TRUE or False Values.
Arguments:
- Range - The range of cells on which we want to apply the criteria against.
- Criteria - The criteria (Condition) used to determine which cells to compare or Test.
Logical operators
When you are using a test with Microsoft
Excel XOR & NOT Functions, we can use any of the following logical
operators:
Comparison
operator
|
Meaning
|
Example
|
=
|
equal to
|
A1=D1
|
>
|
greater than
|
A1>D1
|
>=
|
greater & or equal to
|
A1>=D1
|
<
|
less than
|
A1<d1
|
<=
|
less than & or equal to
|
A1<=D1
|
<>
|
not equal to
|
A1<>D1
|
You can download free
the Complete Practice of Concern Topic of Microsoft Excel File, Click on the below
download icon,
This article explains in simple terms how to
use XOR & NOT Functions. It takes a step-by-step approach, & following below
contents we will touch in this post.
- Microsoft Excel XOR Function explanation
through various examples.
- Microsoft Excel NOT Function
explanation through various examples.
Let’s start to learn something
new about the XOR & NOT Functions of Microsoft Excel.
1. Microsoft
Excel XOR Function - Example 1.
Microsoft Excel XOR Function is
used to test or compare all of given arguments evaluate to True or false, read
the below note,
Note
When we are Using Microsoft Excel XOR
Function, keep in mind that Returns will be TRUE if either of the
arguments evaluate to TRUE, If neither of the conditions is met or all
conditions are met, the formula returns FALSE.
|
So now we explain XOR Function
through various examples, as shown below,
Explanation: - In this
example we have taken the information of a School result, from "Row
2" to "Row 10" which contains the information of Student’s
Name, Subject 1 Marks, Subject 2 Marks & the last "E"
column contains the formula that how we can use the XOR Function to get
our specific return. As we see that the cell "E6" contains the
XOR Function & "B6, C6 & D6” are our given information, so
we have used two arguments in this example, our 1st argument
is "C6=83" & our second argument is "D6>85",
in selected cell "E6" the XOR Function evaluate our second
argument (because cell "D6" is greater than "85")
therefore return is "TRUE".
In this scenario, we have used a
formula like below,
=XOR(C6=83,D6>85)
|
Example 2.
If in the case when we use multiple
arguments, so then see the below example,
Explanation: - In this
example we see that from "Row 2" to "Row 9"
which contains the information & the last "I" column contains the formula that how we can use the XOR Function to get our specific return.
As we see that the cell "I6" contains the XOR Function & "B6:H6”
are our given information, so we have used seven arguments in this example, our
first three arguments are "FALSE" & our last
four arguments are "TRUE", in selected cell "I6"
the XOR Function doesn’t evaluate our last four arguments (because of four
arguments are "EVEN") therefore return is "FALSE".
In this scenario, we have used a
formula like below,
=XOR(B6:H6)
|
Example 3.
If in the case when we want to change
or replace return TRUE & FALSE with other words like Good & Bad,
so then see the below example,
Explanation: - In this
example we see that from "Row 2" to "Row 10"
which contains the information of Student’s Name, Subject 1 Marks,
Subject 2 Marks & the last "E" column contains the formula that how we can use the XOR Function to get our specific return.
As we see that the cell "E6" contains the XOR Function & "B6,
C6 & D6” are our given information, so we have used two arguments in
this example, our 1st argument is "C6=70"
& our second argument is "D6>70", in
selected cell "E6" the XOR Function evaluate our second
argument (because cell "D6" is greater than "70")
therefore the return is "Good".
In this scenario, we have used a
formula like below,
=IF(XOR(C6=70,D6>70),"Good","Bad")
|
2. Microsoft Excel NOT Function - Example 1.
Microsoft Excel Not Function is used to test
or compare of given arguments evaluate to True or false, read the below note,
Note
When we are Using Microsoft Excel NOT
Function, keep in mind that Returns the reversed logical value of its argument. For example, if the argument is FALSE, then TRUE is returned and vice versa.
|
So now we explain NOT Function through
various examples, as shown below,
Explanation: - In this
example we see that from "Row 2" to "Row 10"
which contains the information of Student’s Name, Subject 1 Marks,
Subject 2 Marks & the last "E" column contains the formula that how we can use the NOT Function to get our specific return.
As we see that the cell "E6" contains the Not Function & "B6,
C6 & D6” are our given information, so we have used an argument in this
example, our argument is "C6<70", in
selected cell "E6" the NOT Function doesn’t evaluate our
argument (because cell "C6" is greater than "70")
therefore the return is "TRUE", (Inverse of FALSE is TRUE).
In this scenario, we have used a
formula like below,
=NOT(C6<70)
|
Example 2.
If in the case when we want to change
or replace return TRUE & FALSE with other words like Good & Bad,
so then see the below example,
Explanation: - In this
example we see that from "Row 2" to "Row 10"
which contains the information of Student’s Name, Subject 1 Marks,
Subject 2 Marks & the last "E" column contains the formula that how we can use the NOT Function to get our specific return.
As we see that the cell "E6" contains the Not Function & "B6,
C6 & D6” are our given information, so we have used an argument in this
example, our argument is "C6=70", in
selected cell "E6" the NOT Function evaluate our argument
(because cell "C6" is equal to "70")
therefore return is "Bad", (Inverse of Good is Bad).
In this scenario, we have used a
formula like below,
=IF(NOT(C6=70),"Good","Bad")
|
No comments:
Post a Comment