IF/AND worksheet function

  • Thread starter Thread starter Fan924
  • Start date Start date
F

Fan924

How do I word a worksheet function where both of these is true,
IF C18=C20 AND IF C18=C16
gives a 1, not it gives a 0
 
AND is be used as below..all the conditions inside braces ()
=IF(AND(C18=C20,C18=C16),1,0)

Here even if these cells are blank; it will return 1. If you want to avoid
this add one more condition within AND...
=IF(AND(C18<>"",C18=C20,C18=C16),1,0)

If this post helps click Yes
 
Thanks, works great.
How about something more complex? I get an error with all I try

IF(AND(C10=C12,C10=C8),1,0) OR IF(AND(C10=C12,C10=C14),1,""),1,0)
returns a 1 of 0
 
Try the below...The new condition is again within the same IF

=IF(OR(AND(C10=C12,C10=C14),AND(C10=C12,C10=C8)),1,0)

OR

=IF(AND(C10=C12,OR(C10=C14,C10=C8)),1,0)


If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top