Forum Discussion
IF formula implementation with multiple logic
- Apr 01, 2020Hi Nandhu19940
Try plugging this in:
=IF(AND(IF(AND(A2=1,B2=FALSE,D2="--"),"AN","-")="AN",IF(OR(C2="CEM",C2="NONCAT",C2="INFORMATION",C2="FINANCE",C2="CR",C2="PENSION",C2="UINV",C2="CTRLM",C2="JIPE",C2="CSARC"),"AN","-")="AN"),"AN","-")
Just replace "AN" with "Required action"
BR,
Try plugging this in:
=IF(AND(IF(AND(A2=1,B2=FALSE,D2="--"),"AN","-")="AN",IF(OR(C2="CEM",C2="NONCAT",C2="INFORMATION",C2="FINANCE",C2="CR",C2="PENSION",C2="UINV",C2="CTRLM",C2="JIPE",C2="CSARC"),"AN","-")="AN"),"AN","-")
Just replace "AN" with "Required action"
BR,
- Nandhu19940Apr 01, 2020Copper Contributor
Dear Bran,
Your formula works perfectly and kindly explain me the concept behind that one.
- Branislav1984Apr 01, 2020Brass Contributor
Hi Nandhu19940
I basically did two tests and merged them into one....so,
=IF(AND(A2=1,B2=FALSE,D2="--"),"AN","-")...lets call this TestA, which will either return AN or fail
=IF(OR(C2="CEM",C2="NONCAT",C2="INFORMATION",C2="FINANCE",C2="CR",C2="PENSION",C2="UINV",C2="CTRLM",C2="JIPE",C2="CSARC"),"AN","-")....lets call this TestB whcih will again either return AN or fail...
Finally you combine them:
=IF(AND(TestA ="AN", TestB="AN"), "AN", "-")...meaning both separate test must return AN in order for formula to evaluate.
Hopefully its a bit clearer...I got lost myself trying to dissect it and I wrote it like 2 hours ago 😄
Soon, we will have access to new function "LET" which will help with writing formulas like this.
Best regards,
- Nandhu19940Apr 12, 2020Copper Contributor
Branislav1984 Thanks lot for explaining me the concept and now i could do more better in IF conditions.
Lets wait for LET function to come in future.