Can this be right? Excel has no XOR function???

  • Thread starter Thread starter LSB M
  • Start date Start date
L

LSB M

Find it hard to believe that Excel doesn't have the exlusive OR
funcion.

I need something to say either A or B but NOT both. I suppose can
write a longer formula to achieve this but.... :confused:
 
davesexcel said:
=IF(A1="No","GoodBye",IF(A1="Yes","Hello",""))

you mean something like this??

No. The exclusive OR function is
=AND(OR(A1,B1),NOT(AND(A1,B1)))
 
No explicit function but you can always make up one
=IF(COUNTIF(A1:B1,"X")=1,TRUE,FALSE)
returns TRUE if and only if there is one X in the range.
 
An old thread but it’s time to wake it up… Microsoft has finally realized the need for a XOR-function and has added this to Excel 2013.
If you compare how to do XOR in Excel 2013 with previous version
If you like do do a test of exclusive disjunction in cell A1, A2, A3 and A4 you do it like this in Excel 2013:
=XOR(A1;A2;A3;A4)
Compare this to how you needed to do this in previous versions:
=OR(AND(A1;NOT(A2);NOT(A3);NOT(A4));AND(A2;NOT(A1);NOT(A3);NOT(A4));AND(A3;NOT(A1);NOT(A2);NOT(A4));AND(A4;NOT(A1);NOT(A2);NOT(A3)))
Read my blog post where I describe this in more detail, and also provide a spreadsheet example:
http://excelblogger.com/xor-excel-2013-function/

Best regards from
http://excelblogger.com/
 
Back
Top