Google 表格 - 组合 COUNTBACKGROUNDCOLOR 和 COUNTIF 公式

发布于 2025-01-09 11:27:03 字数 179 浏览 1 评论 0原文

我想计算某一列中出现的特定文本(aus)的数量,但我只想搜索具有一种特定颜色的行。我有两个单独的工作公式,但尚未成功地将它们结合起来。有人知道如何做到这一点吗:)?这是我有的2个公式:

=COUNTBACKGROUNDCOLOR("J2:J361";"A2")

=COUNTIF(J2:J361; "*aus")

I want to count the amount a certain text(aus) appears in a column, but I only want to search the rows that have one specific color. I have the two seperate working formulas but haven't been able to combine them succesfully yet. Anybody an idea how to do this :) ? Here are the 2 formulas i have:

=COUNTBACKGROUNDCOLOR("J2:J361";"A2")

=COUNTIF(J2:J361; "*aus")

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

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

发布评论

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

评论(1

唠甜嗑 2025-01-16 11:27:03

看起来好像您正在使用脚本来实现您自己的 COUNTBACKGROUNDCOLOR() 函数。如果是这种情况,您无法按原样组合这两个函数,因为它是用户定义的函数。正如 MattKing 指出的那样,可能会用您的数据和用于声明颜色(复选框)的方法来计算单元格。示例:

条件格式应用于单元格,如果相邻复选框为 TRUE,则单元格突出显示为绿色。

输入图片此处描述

使用的公式

在此处输入图像描述

请注意,答案是 2 而不是 3,因为根据您的公式,您只在 " 之前查找通配符aus”,单元格 D4 包含一个“?”在末尾(“什么是 aus?”)

在此处输入图像描述

It appears as though you are using a script to implement your own function of COUNTBACKGROUNDCOLOR(). If this is the case you cannot combine the two functions as it stands since it is a user defined function. As MattKing pointed out maybe count the cells with your data AND the method used to declare the color (checkboxes). Example:

Conditional formatting applied to cells that highlight the cell green if adjacent checkbox is TRUE.

enter image description here

Formula used

enter image description here

Notice the answer is 2 and not 3 because from your formula you are only looking for wildcards before "aus" and Cell D4 contains a "?" at the END ("what is aus?")

enter image description here

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