简体   繁体   English

按列对 Google 表格中每一行的最小值求和

[英]Sum column wise the min values of each row in Google Sheets

I would like to write the formula that sums for each column the values that are the minimum for each row.我想编写一个公式,对每一列的每一行的最小值求和。

I have a table like this:我有一张这样的桌子:

A一种 B C C
1 1个 10 10 20 20 5 5个
2 2个 3 3个 4 4个 9 9
3 3个 1 1个 7 7 4 4个
Sum of only min只有分钟的总和 4 4个 0 0 5 5个

In the example, column A has 3 and 1 that are the minimum of row 2 and 3.在示例中,A 列的 3 和 1 是第 2 行和第 3 行中的最小值。

You can try with this formula:你可以试试这个公式:

    =BYCOL(
MAP(A2:4,LAMBDA(e,IF(e=MIN(INDEX(A1:4,ROW(e))),e,IF(COUNTA(INDEX(A2:4,,COLUMN(e)))=0,"",0)))),
LAMBDA(each,IFERROR(SUM(each))))

在此处输入图像描述

Here's another solution:这是另一个解决方案:

=ArrayFormula(BYCOL(IF(A1:C3=BYROW(A1:C3,LAMBDA(r,MIN(r))),A1:C3),LAMBDA(c,SUM(c))))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM