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

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 谷歌表vlookups之和_Google Sheets_Formula_Array Formulas - Fatal编程技术网

Google sheets 谷歌表vlookups之和

Google sheets 谷歌表vlookups之和,google-sheets,formula,array-formulas,Google Sheets,Formula,Array Formulas,我在谷歌表单中有一些数据,看起来有点像: 我需要一个公式来过滤a列中的每个唯一值,返回C列中的值,然后对这些值求和(基本上类似于vlookups的和) 答案应该是6000,到目前为止,我从这个公式得到的最接近的是9000:=sumif(A4:C12,unique(A4:A12),C4:C12) 提前谢谢 看起来您是说C列的值取决于A列的值。在您给出的示例中,红色总是3000,蓝色总是2000,绿色总是1000 如果是这样的话,=SUM(UNIQUE(C4:C12))会给你你想要的答案 如果不是

我在谷歌表单中有一些数据,看起来有点像:

我需要一个公式来过滤a列中的每个唯一值,返回C列中的值,然后对这些值求和(基本上类似于vlookups的和)

答案应该是6000,到目前为止,我从这个公式得到的最接近的是9000:=sumif(A4:C12,unique(A4:A12),C4:C12)


提前谢谢

看起来您是说C列的值取决于A列的值。在您给出的示例中,红色总是3000,蓝色总是2000,绿色总是1000

如果是这样的话,
=SUM(UNIQUE(C4:C12))
会给你你想要的答案


如果不是这样的话,我认为你不能按你的要求去做。例如,如果红色值为3001、3002和3003,您如何知道要求和哪一个?

Thank@veryrad我通过使用:=sum(unique(query($A$15:$J,“select A,F”))来解决这个问题,这样只计算唯一的行