我有一张这样的桌子:
+---+---------+----------+--------+ | | A | B | C | +---+---------+----------+--------+ | 1 | John | Judy | Team A | | 2 | Brandon | Bethany | Team B | | 3 | Agnes | | Team A | | 4 | William | Welma | Team B | | 5 | Tom | Theresa | Team B | | 6 | Peter | | Team A | +---+---------+----------+--------+
计算人数很容易:
=COUNTA(A1:B6) -> 10
我如何计算每个团队的人数?即A队是4,B队是6。
答案 0 :(得分:1)
您可以将COUNTA()
与FILTER()
结合使用以达到以下结果:
=COUNTA(FILTER(A:B, C:C="Team A")) -> 4
=COUNTA(FILTER(A:B, C:C="Team B")) -> 6