简体   繁体   English

如何计算回复条件的单元格

[英]How to count cells that reply to a condition

Lets say I have this kind of spreadsheet: 可以说我有这种电子表格:


  1. P1A | P1A | P2A | P2A | P3A| P3A | RA RA
  2. 1 | 1 | 2 | 2 | 3 | 3 | 1 1个
  3. 2 | 2 | 4 | 4 | 2 | 2 | 4 4
  4. 1 | 1 | 3 | 3 | 3 | 3 | 3 3

Where each row represents answers to a question. 每行代表一个问题的答案。 First row is title row. 第一行是标题行。 P1A - P3A is player1 through player3 answers and RA is the right answer. P1A-P3A是玩家1到玩家3的答案,RA是正确的答案。

Is it possible to add subtotal row which will show number of right answers for each player without adding extra columns for making "IF" tests. 是否可以添加小计行,该行将显示每个玩家的正确答案数,而无需添加用于进行“ IF”测试的额外列。

So the total will look like this: 1 | 因此总数将如下所示:1 | 2 | 2 | 1 1个

You can use sum product to find this. 您可以使用求和积来查找。 Use the formula like below 使用如下公式

=SUMPRODUCT((A2:A4=$D2:$D4)*1)

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

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