How do I nest an OR function within an AND function?

D

DebbieK

Here is my example - can I do this? What have I done wrong I can't get it to
work.

IF(AND(OR($AD4=â€Aâ€,$AD4=â€SUâ€,$AD4=â€GFâ€),$AF4<>â€â€),â€Updated Allowance is Not
Applicableâ€,"")
 
J

JE McGimpsey

When I remove the "smart quotes" from your formula, it works as it
should. What does "I can't get it to work" mean?
 
B

Bernie Deitrick

Debbie,

Your formula as shown:

=IF(AND(OR($AD4="A",$AD4="SU",$AD4="GF"),$AF4<>""),"Updated Allowance is Not
Applicable","")

worked fine for me. What logic do you want to actually use?

HTH,
Bernie
MS Excel MVP
 
P

Peo Sjoblom

Your formula will check if AD4 is either "A", "SU" or "GF" AND AF4 is not blank

That can be simplified to

=IF(AND(OR($AD4={"A","SU","GF"}),$AF4<>""),"Updated Allowance is not
Applicable","")


Regards,

Peo Sjoblom
 
Top