View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default Having "Or" in an If statement doesn't work?

Hi,

It's not clear from your question whether you are doing this in the
spreadsheet or in code.

IF in code:

IF a=2 OR b=2 then
...
End IF

or

IF a=2 XOR b=2 then
....
End IF

In the spreadsheet there is no XOR option you would need to make a more
complicated formula.

--
Cheers,
Shane Devenshire


"J@Y" wrote:

I was trying this statement:

If a = 2 or b =2 then .....

But the b = 2 doesn't get tested for some reason, why is that?