Xor operator or function?

  • Thread starter Thread starter awrightus
  • Start date Start date
A

awrightus

Excel doesn't seem to have a built in Xor operator or function, as far
as I can tell. Is there any way to Xor two decimal numbers in Excel?
Thanks.

Steve
 
Hello. Don't know if this will help, but Excel's vba has an "Xor" function.
Perhaps make a User Defined Function.

Sub Demo()
Dim n1
Dim n2

n1 = 15
n2 = 10

Debug.Print Hex2Bin(n1)
Debug.Print Hex2Bin(n2)

Debug.Print n1 Xor n2 ' Ans = 5
End Sub

Returns:
10101
10000
5

HTH :>)
 
Back
Top