Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 使用数组公式对所有行中的所有值求和_Google Sheets_Google Sheets Formula_Array Formulas - Fatal编程技术网

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

Google sheets 使用数组公式对所有行中的所有值求和,google-sheets,google-sheets-formula,array-formulas,Google Sheets,Google Sheets Formula,Array Formulas,我想要一个数组公式来总结每行G26:AD列,因为行的数量是动态的 =ArrayFormula(sum(G26:26)) 不起作用。我尝试使用MMULT,但未能使其正常工作: =MMULT(G26:26,TRANSPOSE(ARRAYFORMULA(COLUMN(G26:26)^0))) 还有其他想法吗?按行求和 A:C中每行的总和: =arrayformula(mmult(A2:C*1,转置(A2:C2*0+1)) 编辑。这一个更短:=arrayformula(mmult(A2:C*1,

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

=ArrayFormula(sum(G26:26)) 
不起作用。我尝试使用MMULT,但未能使其正常工作:

=MMULT(G26:26,TRANSPOSE(ARRAYFORMULA(COLUMN(G26:26)^0)))
还有其他想法吗?

按行求和
A:C
中每行的总和:

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

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


按条件行求和
=数组公式(mmult(A2:C*--(A2:C>0),转置(A2:C2^0))

其他条件:

=arrayformula(mmult(A2:D*1,转置(A2:D2^0*iseven)(列(A2:D2)'))


你想把每一行的总和放在那一行的单元格中,意思是把G2:2的内容相加,把答案放在F2单元格中,把G3:3的总和放在F3单元格中,等等?先生,你真是个天才!如果预先知道有多少列,也可以执行
=mmult(A2:C10,{1;1;1})
。本例还突出显示了相当模糊的
转置(A2:C2*0+1)
。所有这些需要做的就是生成一列
1
值。