gpt4 book ai didi

google-sheets - 使用数组公式对所有行中的所有值求和

转载 作者:行者123 更新时间:2023-12-04 21:00:07 27 4
gpt4 key购买 nike

我想要一个数组公式来总结每行 G26:AD 列,因为行数是动态的。

=ArrayFormula(sum(G26:26)) 

不起作用。我尝试使用 MMULT,但没有成功:

=MMULT(G26:26,TRANSPOSE(ARRAYFORMULA(COLUMN(G26:26)^0)))

还有其他想法吗?

最佳答案

按行求和

A:C中每一行的总和:

=arrayformula(mmult(A2:C*1, transpose(A2:C2 * 0 + 1)))

enter image description here

编辑。这个更短:=arrayformula(mmult(A2:C*1, transpose(A2:C2 ^ 0)))


按条件求和

=arrayformula(mmult(A2:C*--(A2:C>0), transpose(A2:C2 ^ 0)))

enter image description here

其他条件:

=arrayformula(mmult(A2:D*1, transpose(A2:D2 ^ 0*iseven(column(A2:D2)))))

enter image description here

关于google-sheets - 使用数组公式对所有行中的所有值求和,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46000416/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com