Reputation: 1
I have a Google Form that asks a series of Yes/No questions. I'm trying to sum the number of Yes responses in each row as a new submission is entered.
Here's what I have, that doesn't work.
=ARRAYFORMULA(if(isblank(E$2:E),"",(COUNTIF(A2:D2,"yes"))))
It works for one cell if I remove isBlank, and just do this:
=ARRAYFORMULA(COUNTIF(A2:D2,"yes"))
But then I've lost the benefit of using "isBlank" to autopopulate for new form submissions. I'm really trying to avoid doing this with hidden sheets.
Upvotes: 0
Views: 1168
Reputation: 50452
=ARRAYFORMULA((IF(A2:A<>"",MMULT(--(A2:D="yes"),ROW(A1:A4)^0),"")))
Upvotes: 0
Reputation: 27262
In E1 try this formula
={"Count";arrayformula(if(len(A2:A), mmult(--(B2:D="Yes"), transpose(B1:D1^0)),))}
Change range to suit.
Upvotes: 1