Forum Discussion
AL789
Dec 18, 2019Copper Contributor
Help: IF statement with Multiple AND , OR conditions
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 conditi...
- Dec 18, 2019
I tried to reduce the logic and this is what my formula looks like in D2 of the attached file:
Haytham Amairah
Dec 18, 2019Silver Contributor
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
AL789
Dec 18, 2019Copper Contributor
Thank you for the response. Unfortunately this didn't provide all of the results I needed, but I found a formula that did.