LiveFlow raises $13.5 million Series A led by New York-based Valar Ventures and launches LiveFlow Next to revolutionize finance!
Read More
Arrow
Back to guides
Excel Formulas

XOR Function in Excel: Explained

In this article, you will learn what the XOR formula in Excel does and how to use it.

What does the XOR formula in Excel do?

The XOR function in Excel is a logical function that stands for "exclusive or". It takes one or more logical arguments and returns a logical value of TRUE or FALSE, depending on whether an odd or even number of arguments evaluate to TRUE.

How to use the XOR function in Excel

The syntax of the XOR function in Excel is:

=XOR(logical1, [logical2], ...)

where logical1, logical2, etc. are the logical values or expressions that you want to evaluate.

The function returns TRUE if an odd number of arguments are TRUE, and returns FALSE if an even number of arguments are TRUE.

Note 1: The XOR function can accept up to 255 logical values to compare.

Note 2: ​​The inputs to the formula must evaluate to logical values TRUE or FALSE, or in arrays or references that contain logical values. If the argument contains text or empty cells, those values are ignored. However, If the specified inputs contain no logical values, XOR returns the #VALUE! error value.

XOR function: Case study in real life

Here’s how you can use the XOR function in Real Life

Suppose you are an HR manager and you want to offer your employees a choice between two benefits: a health plan and a retirement plan. However, you want to ensure that each employee can only choose one benefit, not both.

To accomplish this, you can use the XOR function in Excel. The XOR function is a logical function that returns TRUE if only one of the arguments is TRUE, and FALSE if both arguments are either TRUE or FALSE.

How to use the XOR formula in Excel

In this formula, Column C are the cells containing the TRUE/FALSE value for the Health Plan, and Column D are the cells containing the TRUE/FALSE value for the Retirement Plan. The XOR function evaluates whether only one of these cells contains TRUE. If both cells contain TRUE or both cells contain FALSE, the function returns FALSE. If only one cell contains TRUE, the function returns TRUE.

By using the XOR function in this way, you can ensure that each employee has chosen only one benefit, and avoid any confusion or mistakes that might arise if an employee were to choose both benefits.

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Cta Photo

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how!

Get personal help

We guarantee you personal help on chat or Zoom within maximum 6 hours between 9am and 10pm EST.
Blue Tick
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below

Supercharge your financial reporting today

See LiveFlow in action and discover how to streamline your workflows.

Book a demo