在Excel中将对角单元格归零而不改变矩阵。

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

Assign zero to diagonal cells without changing the matrix in Excel

问题

我想要实现LARGE()函数,不改变矩阵的情况下将对角元素置为零,可以通过以下方式实现:=IF(ROW()=COLUMN(),0,""),如果允许改变基础矩阵的话。

英文:

I want to implement LARGE() function without changing the matrix while assigning zero to diagonal elements which can be achieved through =IF(ROW()=COLUMN(),0,"") if the change of base matrix is allowed.

在Excel中将对角单元格归零而不改变矩阵。

答案1

得分: 2

=使用MAP函数从您的数组创建一个新数组。在LAMBDA公式中使用您的IF逻辑。这将创建一个所有对角线都是零的数组:

=MAP(A1:F6, LAMBDA(a, IF(ROW(a) = COLUMN(a), 0, a)))

将其放在您的LARGE公式中,这样将从新数组中获取第10大的值:

=LARGE(MAP(A8:F13, LAMBDA(a, IF(ROW(a) = COLUMN(a), 0, a))), 10)

英文:

Use the MAP function to create a new array from your array. Use your IF logic in the LAMBDA formula. This creates an array where all the diagonals are zeros:

=MAP(A1:F6,LAMBDA(a,IF(ROW(a)=COLUMN(a),0,a)))

Put that inside your LARGE formula, so this would take the 10th largest value from the new array:

=LARGE(MAP(A8:F13,LAMBDA(a,IF(ROW(a)=COLUMN(a),0,a))),10)

在Excel中将对角单元格归零而不改变矩阵。

huangapple
  • 本文由 发表于 2023年8月10日 23:06:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76877028.html
匿名

发表评论

匿名网友

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

确定