Share via

Microsoft Excel XOr Broken

Anonymous
2013-08-13T13:58:52+00:00

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

Microsoft 365 and Office | Excel | For home | Windows

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.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2013-08-13T16:21:01+00:00

    Rich,

    Thanks

    '---

    Jim Cone

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-08-13T16:14:39+00:00

    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

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-08-13T15:49:53+00:00

    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

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-08-13T15:34:09+00:00

    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

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-08-13T14:53:02+00:00

    Hi,

    The formula =XOR(TRUE,TRUE) returns FALSE for me in 2013.  What formula have you used?

    Cheers

    Rich

    Was this answer helpful?

    0 comments No comments