英文:
How to return column heads of top 5 lowest averages when there are multiple duplicate average values in excel?
问题
以下是翻译好的部分:
我在Excel中有以下表格,并需要检索前5个最低平均值的列标题。然而,有些列具有相同的平均值。
| 列A | 列B | 列C | 列D | 列E |
| ------- | ------- | ------- | ------- | -------- |
| 2 | 3 | 4 | 3 | 2 |
我尝试在我的公式中使用索引、匹配和小函数,但它只识别最低平均值的第一个实例(在这种情况下是列A),并不返回列E。
我需要显示前5个最低平均值的列:
列A
列E
列B
列D
列C
英文:
I have the following table below in excel and need to retrieve the column headers for the top 5 lowest averages. However some of the columns have the same averages
| Column A | Column B | Column C | Column D | Column E |
| -------- | -------- | -------- | -------- | --------- |
| 2 | 3 | 4 | 3 | 2 |
I tried using Index, Match and Small in my formula however it identifies only first instance of the lowest average (in this instance Column A) and doesn't return Column E.
I need the top 5 lowest averages to appear:
Column A
Column E
Column B
Column D
Column C
答案1
得分: 1
以下是翻译好的部分:
对于非 MS 365 版本也应该适用(Excel 2021):
=INDEX(SORT(TRANSPOSE(A1:E2),2),SEQUENCE(5),1)
或者使用 SORTBY
(对于大型数据集可能比 SORT
更快):
=INDEX(TRANSPOSE(SORTBY(A1:E1,A2:E2)),SEQUENCE(5))
注意:由于我们只有5列,它选择了所有列,但是您可以在公式中将数字 5
更改为较小的数字,以返回较少的行。
英文:
The following should work for non MS 365 version too (Excel 2021):
=INDEX(SORT(TRANSPOSE(A1:E2),2),SEQUENCE(5),1)
Or using SORTBY
(probably faster than SORT
for a large dataset):
=INDEX(TRANSPOSE(SORTBY(A1:E1,A2:E2)),SEQUENCE(5))
Note: Since we only have 5 columns it selects all of them, but you can check that if you change in the formula 5
by any lower number it returns less rows.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论