A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Rich,
Thanks
'---
Jim Cone
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
It appears that in 2013 Excel the XOr functionality is broken? For some reason two positive values are returning a third positive value.
Could someone verify that this functionality is or is not correct? My understanding of exclusive or is that it should return false unless one of the values is exclusive from the other.
Thanks
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Rich,
Thanks
'---
Jim Cone
Rich,
I don't have xl2013, but I am very curious.
What does this return in xl2013...
Sub More0fIt()
Dim x
x = True Xor True
MsgBox x
End Sub
Jim Cone
Hi,
It also returns False.
Also:
Sub More0fIt()
Dim x
x = Application.WorksheetFunction.Xor(True, True)
MsgBox x
End Sub
returns False. Therefore it ain't broke in 2013...
Cheers
Rich
It appears that in 2013 Excel the XOr functionality is broken? For some reason two positive values are returning a third positive value.
Could someone verify that this functionality is or is not correct? My understanding of exclusive or is that it should return false unless one of the values is exclusive from the other.
Thanks
Hi. When you say "two positive values..." I "assume" you are referring to Excel vba's implementation of it? It should be positive, but would also include zero when they are equal.
Sub Demo()
Dim j, k
For j = 1 To 5
For k = 1 To 5
Debug.Print j, k, j Xor k
Next k, j
End Sub
= = = = =
1 1 0
1 2 3
1 3 2
1 4 5
1 5 4
...etc
Rich,
I don't have xl2013, but I am very curious.
What does this return in xl2013...
Sub More0fIt()
Dim x
x = True Xor True
MsgBox x
End Sub
Jim Cone
Hi,
The formula =XOR(TRUE,TRUE) returns FALSE for me in 2013. What formula have you used?
Cheers
Rich