X Series Macro Examples


Perform a logical exclusions on two expressions. If both expressions are True or both are False then the result is False. If one of the expressions is True or False then it will return True. The code below will return False as both expression are correct. The second example will return True as one of the expression is True.

Sub xorDemo ()

x = 4

y = 5

If x = 4 Xor y = 5 Then Exit Sub

October 8, 2011
© copyright www.excelcrazy.com. All rights reserved. Design and Development by www.creativebrainweb.com