Link to home
Create AccountLog in
Avatar of excelismagic
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),AND(A2=4,B2=15),AND(A2=5,B2=22),AND(A2=6,B2=95),AND(A2=12,B2=19),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.
SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
@Rgonzo
Good catch. Thanks for the information. :)
Avatar of excelismagic
excelismagic

ASKER

WOW Rgonzo

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")

Open in new window

thanks Neeraj
You're welcome!