View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vince Vince is offline
external usenet poster
 
Posts: 102
Default combine IF, AND and OR operstors in a statement

Excel error. It does work - my bloodshot eye focus must have been playing
up. In the office at 7am today and still at the computer at 10.20 ! Sad or
what?

"joeu2004" wrote:

On Dec 19, 11:26 am, Vince wrote:
How do I nest AND & OR operators in an IF statement? E.g. the statement
=IF(AND(OR(I16="Y",I16="?"),I24="?"),"Please enter country code","ERROR")
creates an error


Do you mean an Excel error message; or do you mean the word "ERROR"?

I do not get any Excel error message when I cut-and-paste what you
wrote above into an Excel spreadsheet. Perhaps you have a typo in
your spreadsheet that you did not repeat when you wrote your posting.
You might try replacing your spreadsheet formula by cut-and-pasting
from your posting, as I did.

If you mean you got the word "ERROR", of course there could be an
error in your logic. To determine that, I would need to know what
values you have in I16 and I24 or a precise specification of your
expectations for all combination of the contents of I16 and I24.