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?
LARGE(Array, k)
function to find the top 10 values of the values stored in the array in step 1.Just put them all together:
=TAKE(SORT(BYROW(HSTACK(TRANSPOSE(B22#),V2#),LAMBDA(RW,AVERAGE(RW))),1,-1),10)
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.
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)