View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Exclusive OR question

Fails on

a = False
b = False
c = False

--
Regards,
Tom Ogilvy


"Bob Phillips" wrote:

If Not ((a And b) Or (a And c) Or (b And c)) Then


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Frederick Chow" wrote in message
...
Hi all,

Sorry first that my question may not be specifically related to Excel VBA,
but I really encountered it when I had to write a VBA function.

Suppose I have three boolean variables A, B and C. How can I test if there
is exactly one of them is true? I found that the following expression

A Xor B Xor C

failed when A = True and B = True and C = True.

Any ideas would be greatly appreciated.

Frederick Chow
Hong Kong.