Dec 17 2019 06:07 PM
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?
Dec 17 2019 07:30 PM
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
Dec 17 2019 10:44 PM
SolutionI tried to reduce the logic and this is what my formula looks like in D2 of the attached file:
Dec 18 2019 05:47 AM
Dec 18 2019 05:48 AM
Dec 18 2019 06:10 AM
Dec 17 2019 10:44 PM
SolutionI tried to reduce the logic and this is what my formula looks like in D2 of the attached file: