View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mark Lincoln Mark Lincoln is offline
external usenet poster
 
Posts: 227
Default Having "Or" in an If statement doesn't work?

On Jun 15, 11:13 am, 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?


It will work in VBA, but not in a cell formula. In a cell the format
is:

=IF(OR(A=2,B=2),[do if true],[do if false])

Mark Lincoln