SOLVED

Help: IF statement with Multiple AND , OR conditions

Copper Contributor

Hi everyone,

 

I need some help writing an IF statement that includes multiple AND and OR conditions. See the sample file attached. I want to write an IF statement that will meet all of the conditions listed in the sample file and that will achieve the results listed in the "decreased risk" column. 

 

Any suggestions?

5 Replies

@AL789

 

Hi,

 

Please see if this formula below achieve what you want:

=IF(A2="Yes","Yes",
IF(AND(A2="No",B2="off"),"No",
IF(AND(
OR(A2="Off",A2="Null",A2="DKNS"),
OR(B2<>"Off",B2<>"Null",B2<>"DKNS")),"Yes",
"DKNS")))

 

This one gives the same result with the new function IFS:

=IFS(A2="Yes","Yes",
AND(A2="No",B2="off"),"No",
AND(
OR(A2="Off",A2="Null",A2="DKNS"),
OR(B2<>"Off",B2<>"Null",B2<>"DKNS")),"Yes",
TRUE,"DKNS")

 

Hope that helps

best response confirmed by AL789 (Copper Contributor)
Solution

@AL789 

I tried to reduce the logic and this is what my formula looks like in D2 of the attached file: 

Nested IF.PNG

Thank you. This worked perfectly for what I am trying to achieve.
Thank you for the response. Unfortunately this didn't provide all of the results I needed, but I found a formula that did.
You’re perfectly welcome!
1 best response

Accepted Solutions
best response confirmed by AL789 (Copper Contributor)
Solution

@AL789 

I tried to reduce the logic and this is what my formula looks like in D2 of the attached file: 

Nested IF.PNG

View solution in original post