简体   繁体   English

单元格在Google Sheets / Excel中如何具有2个公式条件?

[英]How can a cell have 2 formula conditions in Google Sheets/Excel?

I'm trying to filter "confirmed" users. 我正在尝试过滤“已确认”的用户。

I have a column ( DATA!A ) where all user names are found, those who confirmed their status are colored in green. 我有一列( DATA!A ),其中找到了所有用户名,那些确认其状态的用户用绿色显示。

There's another column ( DATA!B ) where the specific status of the users can be found. 在另一列( DATA!B )中,可以找到用户的特定状态。

So I have 2 separated functions, one counts confirmed users: COUNTA(valuesByColor("#00ff00", "#000000", Data!A3:A260) 因此,我有2个独立的函数,其中一个是已确认的用户: COUNTA(valuesByColor("#00ff00", "#000000", Data!A3:A260)

And the other one counts specific status, for example: COUNTIF(Data!B3:B200, "TOP") 另一个计数特定的状态,例如: COUNTIF(Data!B3:B200, "TOP")

Now what I want is a formula that for example counts all "TOP" cells in ( B ) that are confirmed, which means count only if their respective ( A ) is green. 现在我想要的是一个公式,例如,对已确认的( B )中所有"TOP"单元格进行计数,这意味着仅当它们各自的( A )为绿色时才进行计数。

Is there any way to do this? 有什么办法吗?

in Google Sheets, you can't count by background color without addon or script and even with those, you won't be able to combine those two formulae mostly because the majority of scripts just counts it as total, not per row. 在Google表格中,如果没有插件或脚本,就无法按背景色计数,即使有了这些,您也将无法将这两个公式结合起来,这主要是因为大多数脚本只是将其计为总数,而不是每行。 the easiest solution would be to give up on counting background color and have a helper column. 最简单的解决方案是放弃对背景颜色的计数,并创建一个辅助列。 then you could just use FILTER or COUNTIFS . 那么您可以只使用FILTERCOUNTIFS

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

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