0

I am trying to use nested if with Array formula but don't understand what is wrong.

According to my experience it should work.

Here is my formula:

=ARRAYFORMULA(IF(AND(G2:G="D",I2:I="Disagree")=true,"FP",IF(AND(G2:G="A",I2:I="Agree")=true,"TN",IF(AND(G2:G="D",I2:I="Agree")=true,"TP",IF(AND(G2:G="A",I2:I="Disagree")=true,"FN","")))))

What I am receiving is blank output.

2 Answers 2

1

Nested if (to be accurate, AND and OR) is not supported by ARRAYFORMULA, you have to break it down to multiple levels of IF

CHANGE FROM: =ARRAYFORMULA(IF(AND(G2:G="D",I2:I="Disagree"), ...

TO: =ARRAYFORMULA(IF(G2:G="D",IF(I2:I="Disagree", ...

Sign up to request clarification or add additional context in comments.

Comments

1

use:

=ARRAYFORMULA(
 IF((G2:G="D")*(I2:I="Disagree")=true, "FP",
 IF((G2:G="A")*(I2:I="Agree")=true,    "TN",
 IF((G2:G="D")*(I2:I="Agree")=true,    "TP",
 IF((G2:G="A")*(I2:I="Disagree")=true, "FN", )))))

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.