excelismagic
asked on
how to simplify this IF OR AND functions
i have this long formula.
=IF(OR(AND(A2=1,B2=9),AND( A2=2,B2=12 ),AND(A2=3 ,B2=18),AN D(A2=4,B2= 15),AND(A2 =5,B2=22), AND(A2=6,B 2=95),AND( A2=12,B2=1 9),AND(A2= 42,B2=52)) ,"","Ok")
is there any easy way or more simplistic way to achieve the same without these too many ORs and ANDs ? or make it work in a better way.
=IF(OR(AND(A2=1,B2=9),AND(
is there any easy way or more simplistic way to achieve the same without these too many ORs and ANDs ? or make it work in a better way.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
WOW Rgonzo
I am really impressed.
I am really impressed.
+1 Rgonzo1971
Tweaked formula.....
=IF(ISNUMBER(MATCH(A2&" "&B2,{"1 9","2 12","3 18","4 15","5 22","6 95","12 19","42 52"},0)),"","OK")
ASKER
thanks Neeraj
You're welcome!
Good catch. Thanks for the information. :)