基于行或列标题值的条件单元格计数 [英] Conditional cell counting based on row or column header values

查看:365
本文介绍了基于行或列标题值的条件单元格计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请考虑以下内容:

C9计算行头或列头为Team1的YES单元格数。 C10计算其行头或列标题为Team2的YES单元格的数量。

C9 computes the number of YES cells whose row header or column header is Team1. C10 computes the number of YES cells whose whose row header or column header is Team2.

C9和C10的公式应如何?

What should the formula for C9 and C10 be?

推荐答案

公式应该是:

=SUMPRODUCT((($A$3:$A$6=B9)+($C$1:$F$1=B9)>0)*($C$3:$F$6="YES"))

基本上公式是:

IF($ A $ 3:$ A $ 6 = B9 OR $ C $ 1:$ F $ 1 = B9)和$ C $ 3:$ F $ 6 =是然后计数。

IF ($A$3:$A$6=B9 OR $C$1:$F$1=B9) AND $C$3:$F$6="YES" then count it.

每个布尔值将解析为位值True = 1,False = 0。因此,如果第一个值为True,则它将大于0,并将其解析为1.然后将其乘以第三个。所以如果两者中的任何一个解决为False或0,它将添加0,如果两者都解析为True,那么它将添加1。

Each Boolean will resolve to the bit value True = 1 and False = 0. So if either or both of the first are True it will be greater than 0 and that will resolve to 1. Then we multiply it to the third. So if either of the two resolve to False or 0 it will add 0, if both resolve to True then it will add 1.

SUMPRODUCT将它们全部添加在一起,得到计数。

The SUMPRODUCT adds them all together and we get the count.

这篇关于基于行或列标题值的条件单元格计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆