简体   繁体   English

Excel MATCH为两个单元格值的总和

[英]Excel MATCH to sum of two cell values

I have a table of data that include a name column and two numeric columns. 我有一个包含名称列和两个数字列的数据表。 Example: 例:

  A      B   C
Fred     4   2
Sam      3   6
George   1   7

I'm wanting to retrieve the name in column A for the largest sum of columns B and C. In the example above, I would want "Sam" because 3+6 is greater than any of the other sums. 我想要在A列中检索B和C列的最大总和。在上面的例子中,我想要“Sam”,因为3 + 6大于任何其他总和。

I know I could create a hidden column (D) that's filed with 我知道我可以创建一个隐藏的列(D)

=SUM(B2,C2)

and do something like this: 并做这样的事情:

=INDEX(A:A,MATCH(MAX(D:D),D:D,0))

but I'd rather avoid the hidden column, if possible. 但如果可能的话,我宁愿避开隐藏的列。 Is there a way to perform an index-match based on the sum of two cells? 有没有办法根据两个单元格的总和执行索引匹配?

Use the array formula : 使用数组公式

=INDEX(A:A,MATCH(MAX((B:B)+(C:C)),(B:B)+(C:C),0))

在此输入图像描述

Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key. 必须使用Ctrl + Shift + Enter输入 数组公式 ,而不仅仅是Enter键。

(Note the appearance of braces in the formula bar) (注意公式栏中大括号的外观)

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

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