Using COUNTIFS and getting error "Array arguments to COUNTIFS are of different size" in Google Sheets

Viewed 613

I tried to calculate "TRUE" and "FALSE" in Calculation sheet, but I'm getting the error "Array arguments to COUNTIFS are of different size". Any idea what I'm doing wrong?

Formula I'm using: =COUNTIFS(Data!A3:A,"0*",Data!B3:B,"Anna",Data!C3:C,B3,Data!D3:I,"TRUE")

Link to the sheet. In the sheet DATA you can find all data and in the sheet Calculation you can see some kind of overview data/results.

Goal: I want to count "TRUE" from multiple columns (depending on the test) but it should match with correct date, name and type of IDs).

1 Answers

try:

=SUMPRODUCT(FILTER(Data!D3:I, Data!B3:B=A3, Data!C3:C=B3)=TRUE)

for false use:

=SUMPRODUCT(FILTER(Data!D3:I, Data!B3:B=A3, Data!C3:C=B3)=FALSE)

update:

=SUMPRODUCT(IFNA(FILTER(Data!D:I, REGEXMATCH(Data!A:A&"", "^0.+"), 
 Data!B:B=$A3, Data!C:C=$B3)&""="TRUE"))

=SUMPRODUCT(IFNA(FILTER(Data!D:I, REGEXMATCH(Data!A:A&"", "^0.+"), 
 Data!B:B=$A3, Data!C:C=$B3)&""="FALSE"))

enter image description here

Related