How to return column heads of top 5 lowest averages when there are multiple duplicate average values in excel?

huangapple go评论68阅读模式
英文:

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))

这是输出结果:
How to return column heads of top 5 lowest averages when there are multiple duplicate average values in excel?

注意:由于我们只有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))

Here is the output:
How to return column heads of top 5 lowest averages when there are multiple duplicate average values in excel?

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.

huangapple
  • 本文由 发表于 2023年7月7日 07:23:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76633067.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定