Average of BYROW and BYCOL results in Excel

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

Average of BYROW and BYCOL results in Excel

问题

  1. 我想找到第1行总和和第1列总和的平均值,并重复这个过程对所有行和列,得到一个包含20个值的数组。
  2. 我想使用LARGE(Array, k)函数来找到步骤1中数组中存储的前10个最大值。
英文:

I have a 20x20 table for which I applied the BYROW and BYCOL functions to get the row totals and column totals.

Function 1:

B22=BYROW(B2:U21,LAMBDA(row,SUM(row)))

Function 2:

V2=BYCOL(B2:U21,LAMBDA(column,SUM(column)))

How can I achieve the following steps?

  1. I want to find the average of Row 1 total and Column 1 total and repeat this for all rows and columns resulting in an array of 20 values.
  2. I want to use LARGE(Array, k) function to find the top 10 values of the values stored in the array in step 1.

答案1

得分: 3

将它们全部放在一起:

=TAKE(SORT(BYROW(HSTACK(TRANSPOSE(B22#),V2#),LAMBDA(RW,AVERAGE(RW))),1,-1),10)


[![enter image description here][1]][1]

---

根据 @user11222393 的说法,要获取值来自的行/列:

=TAKE(SORT(HSTACK(BYROW(HSTACK(TRANSPOSE(B22#),V2#),LAMBDA(RW,AVERAGE(RW))),SEQUENCE(COUNT(B22#),1,1,1)),1,-1),10)


由于相对行和相对列号相同,它将返回一个单一的相对编号。

[![enter image description here][2]][2]

---

如果你想要更漂亮一点:

=TAKE(SORT(HSTACK(BYROW(HSTACK(TRANSPOSE(B22#),V2#),LAMBDA(RW,AVERAGE(RW))),LET(r,SEQUENCE(COUNT(B22#),1,2,1),"CLM: "&CHAR(65+r)&" rw: "&r)),1,-1),10)


[![enter image description here][3]][3]


  [1]: https://i.stack.imgur.com/Hhmx7.png
  [2]: https://i.stack.imgur.com/mbsWw.png
  [3]: https://i.stack.imgur.com/jUDpl.png
英文:

Just put them all together:

=TAKE(SORT(BYROW(HSTACK(TRANSPOSE(B22#),V2#),LAMBDA(RW,AVERAGE(RW))),1,-1),10)

Average of BYROW and BYCOL results in Excel


As stated by @user11222393, to get the row/column from where the value comes:

=TAKE(SORT(HSTACK(BYROW(HSTACK(TRANSPOSE(B22#),V2#),LAMBDA(RW,AVERAGE(RW))),SEQUENCE(COUNT(B22#),1,1,1)),1,-1),10)

Since relative row and relative column number are the same it will return a single relative number.

Average of BYROW and BYCOL results in Excel


If you want it a little prettier:

=TAKE(SORT(HSTACK(BYROW(HSTACK(TRANSPOSE(B22#),V2#),LAMBDA(RW,AVERAGE(RW))),LET(r,SEQUENCE(COUNT(B22#),1,2,1),"CLM: "&CHAR(65+r)&" rw: "&r)),1,-1),10)

Average of BYROW and BYCOL results in Excel

huangapple
  • 本文由 发表于 2023年8月5日 03:24:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76838677.html
匿名

发表评论

匿名网友

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

确定