Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/24.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
计算excel中不同顺序的两张不同表格之间的分数差_Excel_Function_Google Sheets_Excel Formula_Spreadsheet - Fatal编程技术网

计算excel中不同顺序的两张不同表格之间的分数差

计算excel中不同顺序的两张不同表格之间的分数差,excel,function,google-sheets,excel-formula,spreadsheet,Excel,Function,Google Sheets,Excel Formula,Spreadsheet,我的谷歌电子表格中有两张表格,都有一些球员名单和分数。我需要一个公式来计算每个人的分数差。例如: 在表1中,我们有 Adam - 20 Eve - 30 John - 10 在表2中,我们有 Adam - 35 Dave - 10 Eve - 45 John - 30 所以,我需要表2中每个人得分之间的差值,如下所示 Adam - 35 - 15 Dave - 10 - 0 (since this player was not there before) Eve - 45 - 15 John

我的谷歌电子表格中有两张表格,都有一些球员名单和分数。我需要一个公式来计算每个人的分数差。例如:

在表1中,我们有

Adam - 20
Eve - 30
John - 10
在表2中,我们有

Adam - 35
Dave - 10
Eve - 45
John - 30
所以,我需要表2中每个人得分之间的差值,如下所示

Adam - 35 - 15
Dave - 10 - 0 (since this player was not there before)
Eve - 45 - 15
John - 30 - 20
我似乎想不出一个正确的公式来做这件事。我该怎么做呢

我尝试了下面的公式,但它返回了一个错误

=B2-sumif('Sheet1'!A2:A90,A2==VLOOKUP('Sheet1'!A2,'Sheet1'!A2:A90,1,FALSE),'Sheet1'!B2:B90) 
这是有效的(如果名称在A列中,值在B列中)

在图纸2中,单元格C1(拖动其余单元格)

=B1-IFERROR(VLOOKUP(A1,Sheet1!$A$1:$B$3,2,0),0)

产生以下预期结果:


请记住,您需要扩展
Sheet1范围。

我尝试过类似于=B2 sumif('Sheet1'!A2:A90,A2==VLOOKUP('Sheet1'!A2,'Sheet1'!A2:A90,1,FALSE),'Sheet1'!B2:B90),但返回错误。