View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jonathan Cooper Jonathan Cooper is offline
external usenet poster
 
Posts: 28
Default AND & OR Functions

=IF(OR(AND(A1=1,A2=2),B3=3),"do this if true","do something else if false")

in this example, if both A1 has the value of 1 and a2 has the value of 2, or
if just B3 has the value of 3), then the argument is true, else....not true.

"John P." wrote:

I would like to combine AND and OR in an IF statement. What is the code? For
example, IF(......AND(a1=1, a2=2) OR(a3-"Yes",a4<0).
Thanks