lincolntrace
lincolntrace

Reputation: 25

Google Sheets Arrayformula that checks if column A is blank OR if column D is "TRUE" insert message column E

My formula: =ARRAYFORMULA(IF(ISBLANK(A2:A),"","Insert message here"))

The idea is I want to create an Arrayformula that checks if column A is blank OR if column D is "TRUE". If one of those conditions exists, insert a message in column E.

Column D, TRUE/FALSE column, is populated when I select YES/NO(boolean): No = False, Yes = True.

The formula above is working for column A. I errored out when I attempted to incorporate column D:

Attempt #1: =ARRAYFORMULA(IF(ISBLANK(A2:A),OR(D2:D="TRUE"),"","Insert message here"))

Outcome: Error message: "Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 4 arguments."

Attempt #2: =ARRAYFORMULA(IF(ISBLANK(A2:A),OR(D2:D="TRUE"),"","Insert message here"))

Outcome: The formula results were incorrect.

Please enlighten me.

Attempt 1

Attempt 2

Formula without column D

Upvotes: 1

Views: 801

Answers (1)

player0
player0

Reputation: 1

use:

=ArrayFormula(
 IF((A2:A="")  * (D2:D=FALSE), "",
 IF((A2:A="")  * (D2:D=TRUE),  "E not blank",
 IF((A2:A<>"") * (D2:D=FALSE), "E not blank",
 IF((A2:A<>"") * (D2:D=TRUE),  "E not blank", "")))))

enter image description here

Upvotes: 0

Related Questions