简体   繁体   English

使用Google表格上的ArrayFormula逐行检查COUNTIF

[英]Check row by row COUNTIF using ArrayFormula on Google Sheets

I am trying to make a basic countif function which is =COUNTIF(C2:BE2,"Yes") into an ArrayFunction which is 我正在尝试将=COUNTIF(C2:BE2,"Yes")的基本countif函数转换为ArrayFunction

=ArrayFormula(if(isblank(A2:A),"",countif(C:BE,"Yes")

But this function counts every single "Yes" in the range C:BE . 但是此函数计算C:BE范围内的每个“是”。

How do I make it so it counts row by row and still is an array formula? 我该如何使它逐行计数,仍然是数组公式?

Meaning the cell with this function counts from C2:BE2 and the next one counts from C3:BE3 表示具有此功能的单元格从C2:BE2开始计数,下一个从C3:BE3开始计数

Also I can't use the sign function as it only works if the criteria has numbers in it which the other posts in this forum have. 另外,我不能使用符号功能,因为只有在条件中包含本论坛其他帖子中包含的数字时,它才起作用。

作为MMULT的替代方法(请参阅Max的链接),请尝试输入第2行

=ArrayFormula(if(len(A2:A), countif(if(C2:BE="Yes", row(C2:C)), row(C2:C)),))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM