=XOR(logical1, [logical2], ...)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
Need more than a single XOR formula? Try our free AI for Excel — it reads your entire spreadsheet, answers questions in plain English, and builds charts and analysis in the same chat.
logical1:
The first condition or logical value that you want to evaluate. This is a required parameter.
logical2:
Additional conditions or logical values that you want to evaluate. This is an optional parameter and you can include multiple logical values.
The XOR function in Excel is a logical function that stands for "exclusive or." It evaluates a set of logical conditions and returns TRUE if an odd number of the conditions are TRUE, and FALSE if an even number of conditions are TRUE. In simpler terms, the XOR function helps you determine if only one of the specified conditions is met, making it useful for scenarios where you want to ensure exclusivity among conditions.
Imagine you are managing a project status report, and you have the following data in an Excel spreadsheet:
| Task | Completed | On Hold | Not Started |
|---|---|---|---|
| Task A | TRUE | FALSE | FALSE |
| Task B | FALSE | TRUE | FALSE |
| Task C | FALSE | FALSE | TRUE |
| Task D | TRUE | TRUE | FALSE |
| Task E | FALSE | FALSE | TRUE |
You want to check if exactly one of the statuses for each task is TRUE.
To evaluate whether exactly one status is TRUE for each task, you would use the XOR formula as follows:
=XOR(B2, C2, D2)When you apply the formula to each row, it checks the statuses for each task. The output would be:
| Task | XOR Result |
|---|---|
| Task A | TRUE |
| Task B | TRUE |
| Task C | TRUE |
| Task D | FALSE |
| Task E | TRUE |
Here, the XOR function returns TRUE for Task A, Task B, Task C, and Task E, indicating that exactly one status is TRUE for those tasks. For Task D, it returns FALSE because two statuses are TRUE.
The XOR function is particularly useful when you need to validate conditions where exclusivity is required. It allows you to quickly determine if only one of the specified conditions is met, which can be crucial in decision-making processes.
Understanding how to use the XOR function can significantly enhance your logical evaluations in Excel, enabling you to make informed decisions based on your data.
Happy calculating!
You have a table where Column A contains project names and Column B contains the status of each project (either "On Track" or "At Risk"). You can use the XOR function to determine if exactly one of the projects is "On Track" and the other is "At Risk" at any given time. This helps project managers quickly identify situations where there is a mix of project statuses, allowing for timely interventions and resource allocation without the need for more complex logical operations.
Beyond the XOR function: Better Analyst is a full Excel AI that goes well past individual formulas. Upload any spreadsheet and ask questions in plain English — you'll get formulas, data analysis, and charts back in seconds. It's a free AI Excel assistant that works with any .xlsx, .xls, or .csv file — no plugins, no Microsoft 365 required.
Don't have a spreadsheet yet? Use our free AI spreadsheet generator to turn a text prompt into a downloadable Excel file — a full AI Excel sheet maker that builds headers, columns, and formulas from your description.
Create a free account for formula help, explanations, and spreadsheet analysis. Usage limits depend on your plan.
Browse our complete library of Excel formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.