EDUCBA

EDUCBA

MENUMENU
  • Explore
    • Lifetime Membership
    • All in One Bundles
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Login
Home Excel Excel Resources Logical Functions in Excel Tutorial Excel XOR Function

Excel XOR Function

Ashwani Jaiswal
Article byAshwani Jaiswal
Madhuri Thakur
Reviewed byMadhuri Thakur

Updated August 19, 2023

XOR Function in Excel

Excel XOR Function (Table of Contents)
  • XOR Function in Excel
  • How to use XOR Function in Excel?

XOR Function in Excel

XOR Functions in Excel perform “Exclusive OR”. This function with two logical statements returns one value. If both statements are TRUE, the result will be FALSE; if any statement is TRUE, then the result will be TRUE.

How to use XOR Function in Excel?

XOR function in Excel can be accessed from the option beside the formula bar with an icon.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

Let’s understand how to use XOR Function in Excel by using some examples.

You can download this XOR Function Excel Template here – XOR Function Excel Template

XOR Function in Excel – Example #1

Here we have a table below, wherein columns A and B have some logical values as 0 and 1; on that basis, we need an exclusive answer or result. The result will be the combined results of both logical values. And the result will always be a combination of TRUE or FALSE.

XOR Function Example 1-1

Now to apply XOR Function in Excel, go to the cell where we need to see the result. Now go to the Home menu, and besides the formula bar, click on the Function option with an icon Function option with an icon as shown below.

XOR Function Example 1-2

Once we do that, we will get an Insert Function box. Now in Or Select a category option, look for Logical functions, or select All from the drop-down list. And click on OK.

XOR Function Example 1-3

Or else, if the category of the required function is unknown, then Search for a function box. We can search the function XOR with its keyword and click on Go. We will get a possible function below the category list drop-down, as shown below. Then click on OK.

XOR Function Example 1-4

As we can see above, at the bottom of the box, which is highlighted, it has the complete syntax of the selected function from the above list. If the function is completely new, then we can perform the function with the help of syntax in the Insert Function box.

Once we click OK, we will see an argument box of a selected function; as we can see, as per syntax, it asks for logical values as input. We can select any number of logical values.

XOR Function Example 1-5

Here, we have selected cells A2 and B2 as our input cells. Once we do that, we will get the suggested result in the argument box at the bottom, as shown below. This shows the correctness of our syntax. After that, click on OK.

XOR Function Example 1-6

Now drag the formula or apply it to all the selected cells. As shown below, we got an Exclusive-OR value with the help of two logical values.

XOR Function Example 1-7

The logic is simple.

  • For two POSITIVE logics, we will get FALSE.
  • For two NEGATIVE logics, we will get FALSE.
  • If either of them is POSITIVE, we will get TRUE.

This can be applied to any situation where logic is POSITIVE and NEGATIVE.

XOR Function in Excel – Example #2

There is one more method of executing the XOR function in Excel, which is easy. Let’s consider a new data set, as shown below. This is a combination of TRUE and FALSE Logics.

XOR Function Example 2-1

To execute XOR Function in Excel, go to the cell where we want to see the result and type = (Equal) to edit that cell’s edit mode. Once we do that, type or search XOR and select the function as shown below. And we will see the suggested syntax of the selected function, which is boxed in the screenshot below.

XOR Function Example 2-2

Now select the logical input cells. It can be in any number. We will select cells A2 and B2, as shown below, and press enter to execute the formula. If the syntax is incorrect, then we will get an error.

XOR Function Example 2-3

Once done, drag the formula or syntax in all the related cells, as shown below.

XOR Function Example 2-4

As we can see in the above image, for logic 1 and 2, we got the result in column C. The logic is completely simple, as it was already explained in Example 1.

XOR Function in Excel – Example #3

Let’s see an example where we will have 2 logics combined with “1” and “2”, as shown below.

2 Logics

Now for executing XOR for this example, select the cell where we want to see the output and type = (Equal) sign to enable all the functions of Excel and select XOR from the list down as shown below.

XOR Function Example 3-2

Here, we will use the condition of greater than and less than among 1 and 2. Use the combination where 1>0 or 1<0 and the same with 2>0 or 2<0, as shown below.

Greater than and Less

In the above screenshot, we have used 3 conditions where we showed what the results would be if 1 and 2 are greater and less than 0, respectively, in a different combination. S and below is the actual result.

Result

As we can see above;

  • For the 1st condition, where either of one is true, we got TRUE.
  • For the 2nd condition, where both are true logic, we got FALSE.
  • For the 3rd condition, where either of one is true, we got TRUE, same as Example 1.

Pros

  • It is widely used in electronic circuit design for defining the logic before implementation.
  • This concept finds versatile application in any context where we encounter scenarios characterized by 0/1, Yes/No, Win/Lose, or True/False outcomes.
  • It gives the result based on 2 logic only, and 2 logic can repeat any number of times in any number of cells.

Cons

  • The logic-building process sometimes gives the opposite results. So framing correct syntax is necessary.

Things to Remember

  • Ensure you are clear with the logic and the required result.
  • If text logic is used, use inverted commas quotes (“”) to convert texts into value as text cannot be taken directly in any Excel function.
  • Built the logic before using XOR so that when we apply XOR, we can imagine the actual logic with results.

Recommended Articles

This has been a guide to XOR Function in Excel. Here we discussed Using XOR Function in Excel, practical examples, and a downloadable Excel template. You can also go through our other suggested articles –

  1. OR Excel Function
  2. OR Formula in Excel
  3. Logical Functions in Excel
  4. Excel IF AND Function
ADVERTISEMENT
All in One Excel VBA Bundle
500+ Hours of HD Videos
15 Learning Paths
120+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
Financial Analyst Masters Training Program
2000+ Hours of HD Videos
43 Learning Paths
550+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
All in One Data Science Bundle
2000+ Hour of HD Videos
80 Learning Paths
400+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
All in One Software Development Bundle
5000+ Hours of HD Videos
149 Learning Paths
1050+ Courses
Verifiable Certificate of Completion
Lifetime Access
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download XOR Function Excel Template

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download XOR Function Excel Template

EDUCBA

डाउनलोड XOR Function Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

🚀 Extended Cyber Monday Price Drop! All in One Universal Bundle (3700+ Courses) @ 🎁 90% OFF - Ends in ENROLL NOW