Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 检查一组单元格中是否包含一个单元格[Google Sheets]_Google Sheets_Google Sheets Formula - Fatal编程技术网

Google sheets 检查一组单元格中是否包含一个单元格[Google Sheets]

Google sheets 检查一组单元格中是否包含一个单元格[Google Sheets],google-sheets,google-sheets-formula,Google Sheets,Google Sheets Formula,我有一个Google Sheets文档,如下所示: A B C D 1 2 X X 3 3 Z Y 2 4 Z 5 如果A列中对应的值在B列中,如何对C列中的值求和? 在这种情况下,它将是3+2,因为X和Y都在B列中。 非常感谢 试试看: =SUM(FILTER(C2:C,COUNTIF(B2:B,A2:A))) 文件 你不是说“X和Z都在B列”吗?

我有一个Google Sheets文档,如下所示:

    A   B   C   D
1
2   X   X   3
3   Z   Y   2
4       Z
5
如果A列中对应的值在B列中,如何对C列中的值求和? 在这种情况下,它将是3+2,因为X和Y都在B列中。 非常感谢

试试看:

=SUM(FILTER(C2:C,COUNTIF(B2:B,A2:A)))
文件
你不是说“X和Z都在B列”吗?