Countif,但只有一个范围内的前5个占领单元

发布于 2025-02-05 03:15:53 字数 883 浏览 4 评论 0原文

我想要一个公式(也许是Countif?)来计算每个范围的“ w ”和“ d ”和“ l ” :b3:b12d3:d12f3:f12

但是仅在具有值的前5个单元格中计数(不是空的空白单元)。

我不想计算所有“ w ”和“ d ”和“ l ”。

我想计数“ w ”和“ d ”和“ l ”,在前5个填充的细胞上跳过了空白细胞。

公式必须是分开的,这意味着仅计算值“ w ”的公式,这是另一个仅计数值的公式“ d ”,这是另一个仅计算值的公式“ l ”。

简而言之,在前5个单元中计数的数量不是空白的:

  • 有多少个“ w
  • d
  • ” “

我想从绿色示例中获得计数。

我不想从红色示例中获得计数。

请参阅附件图像。谢谢 !

I want a formula ( maybe COUNTIF? ) to count how many "W" and "D" and "L" are found per each range: B3:B12, D3:D12 and F3:F12.

But to count only in the first 5 cells with value (that are NOT empty blank cells).

I don't want to count all "W" and "D" and "L" found in the entire range.

I want to count "W" and "D" and "L" on the first 5 filled cells, skiping the blank cells.

The formulas must be separate, meaning a formula to count just the value "W", another formula to count just the value "D", another formula to count just the value "L".

In short, to count in the first 5 cells that are not blank:

  • How many "W"
  • How many "D"
  • How many "L"

I want to obtain the count from the green examples.

I DO NOT want to obtain the count from the red examples.

Please see attached image. Thank you !
https://i.sstatic.net/5EZ8O.png

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

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

发布评论

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

评论(1

意中人 2025-02-12 03:15:53

使用索引和汇总:

=COUNTIF(B3:INDEX(B:B,AGGREGATE(15,7,ROW(B3:B12)/(B3:B12<>""),5)),"W")

然后,您可以将w更改为其他任何东西,范围更改为所需的范围。

Use INDEX and AGGREGATE:

=COUNTIF(B3:INDEX(B:B,AGGREGATE(15,7,ROW(B3:B12)/(B3:B12<>""),5)),"W")

Then you can change the W to what ever else and the range to the range you want.

enter image description here

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