在excel r中返回最大值的行标签 [英] Return row label for max value in excel r
本文介绍了在excel r中返回最大值的行标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在用于标记表的行的列中返回值?例如,如下表所示,我想找到MAX(A:A)并返回Three而不是值1。
| ABCD
-------- | ---------------------------------
一| 0.2 0.2 0.5 0.4
二| 0.1 0.1 0.6 0.1
三| 1.0 0.3 0.7 0.2
四| 0.5 0.4 0.5 0.3
假设两个值是相同的,那么返回也可以接受。
解决方案假设在第1行到第4行的数据中,将其放在B5中以获得列B的答案:
= INDEX(A1:A4,MATCH(MAX(B1:B4),B1:B4,0))
How do I return the value in a column being used to label the rows of a table? For example, given the table below I want to find MAX(A:A) and return "Three" instead of the value 1.
|A B C D
--------|---------------------------------
One |0.2 0.2 0.5 0.4
Two |0.1 0.1 0.6 0.1
Three |1.0 0.3 0.7 0.2
Four |0.5 0.4 0.5 0.3
Assume if two values are the same then returning either is acceptable.
解决方案
Assuming data in rows 1 to 4, put this in B5 to get the answer for column B:
=INDEX(A1:A4,MATCH(MAX(B1:B4),B1:B4,0))
这篇关于在excel r中返回最大值的行标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文