If, And, Or Formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need help, basically if B8 is equal to the following and attributes and E5
is equal to the other attributes, and I5 is greater than 19, then yes.

I get an error when using the following formula, and I'm not sure if it's a
parenthesis missing or a comma out of place. Can someone help me with this.

=IF(AND(OR($B$8="FAPI",$B$8="PAPI",$B$8="EXPAT",$B$8="INPAT"),$E$5="A",$E$5="L",$E$5="P",$E$5="U",($I$5>19),"Y","N"))
 
=IF(AND(OR($B$8="FAPI",$B$8="PAPI",$B$8="EXPAT",$B$8="INPAT"),$E$5="A",$E$5="L",$E$5="P",$E$5="U",$I$5>19),"Y","N")
 
you also need another or
=IF(AND(OR($B$8="FAPI",$B$8="PAPI",$B$8="EXPAT",$B$8="INPAT"),or($E$5="A",$E$5="L",$E$5="P",$E$5="U"),$I$5>19),"Y","N"))
 
....well spotted. I missed the other "OR".

bj said:
you also need another or
=IF(AND(OR($B$8="FAPI",$B$8="PAPI",$B$8="EXPAT",$B$8="INPAT"),or($E$5="A",$E$5="L",$E$5="P",$E$5="U"),$I$5>19),"Y","N"))
 
Hi,

=IF(AND(OR($B$8="FAPI",$B$8="PAPI",$B$8="EXPAT",$B$8="INPAT"),OR($E$5="A",$E$5="L",$E$5="P",$E$5="U"),$I$5>19),"Y","N")

Thanks,
 
You could shorten it slightly if you used array constants:

=IF(AND(OR($B$8={"FAPI","PAPI","EXPAT","INPAT"}),OR($E$5={"A","L","P","U"}),$I$5>19),"Y","N")
 
Back
Top