使用countif与数组公式

发布于 2025-02-06 19:12:25 字数 597 浏览 2 评论 0原文

我正在尝试获得一个简单的countif公式,以与数组公式结合使用,以计算每行零的数量。原始的基本公式看起来像这样:

= countif($ c6:$ cd6,“ 0”),

我希望该公式降低,以便计算每一行中的零数。

请有人告诉我要使用哪种公式?我尝试了无数版本的Arrayformula版本,它们都没有按照我想要的方式来工作。

谢谢。

编辑/加法:我已经使用以下公式来计数零。

= arrayformula(if(iSblank($ a6:$ a),索引(mmult(1*(if($ ch6:$ da =“”,“”,“×”,$ ch6:$ da)= 0),sequence(列(列) ($ ch6:$ da),1,1,1,1,2))))

我使用了另一个公式(下)来总和某些列中的金额(分类为分类)。 = arrayformula(if(iSblank($ a5:$ a),sumif(if(($ c $ 2:$ cd $ 2)=“ alphabet”,row($ c $ 5:$ c)),row($ c5:$ cd),$ c5:$ cd)))

除此之外,我已经意识到能够在同一列中计算零是有帮助的。这意味着我会结合上面的两个公式。

请问有什么办法吗?

I'm trying to get a simple COUNTIF formula to combine with the Array Formula in order to count the number of zeros in each row. The original basic formula would look like this:

=COUNTIF($C6:$CD6,"0")

I would want the formula to go down so that it counts the number of zeros in each row.

Please could someone tell me which formula to use? I've tried countless versions with Arrayformula and none of them are working the way I want them to.

Thank you.

EDIT/ADDITION: I've used the formula below to count the zeros in a row.

=ArrayFormula(IF(ISBLANK($A6:$A),,INDEX(MMULT(1*(IF($CH6:$DA="", "×", $CH6:$DA)=0), SEQUENCE(COLUMNS($CH6:$DA), 1, 1, )))))

I have used another formula (below) to sum the amounts in certain columns (which are categorised).
=ArrayFormula(IF(ISBLANK($A5:$A),,SUMIF(IF(($C$2:$CD$2)="Alphabet",ROW($C$5:$C)),ROW($C5:$CD),$C5:$CD)))

In addition to this, I've realised it would be helpful to be able to count the zeros in those same columns. That means I would kind of combine the two formulas above.

Is there a way to do this, please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

金兰素衣 2025-02-13 19:12:25

尝试:

=INDEX(MMULT(1*(IF(A1:D4="", "×", A1:D4)=0), SEQUENCE(COLUMNS(A1:D1), 1, 1, )))

try:

=INDEX(MMULT(1*(IF(A1:D4="", "×", A1:D4)=0), SEQUENCE(COLUMNS(A1:D1), 1, 1, )))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文