如何让 Google 表格根据另一列中的条件计算一列中的单元格数量

问题描述 投票:0回答:1

我的例子

A 栏中列出了不同的型号。 在 B 列中,状态列出并标有“kaput”。

我正在尝试计算某些型号的数量,除非它们被列为“kaput”。

在本例中,我想计算所有型号,包括“11”、“C733”、“C771”。

这是一个挑战,因为“11”或“221133”或“model 11”有时被视为文本。

我尝试过 countif/s、正则表达式、arrayformula 和 sum - 我能做得更好吗?

google-sheets array-formulas countif
1个回答
0
投票

您可以尝试:

=countifs(index(regexmatch(A2:A&"";"11|C771|C733"));true;B2:B;"<>kaput")

© www.soinside.com 2019 - 2024. All rights reserved.