Blueko
Blueko

Reputation: 131

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
1 10 20 5
2 3 4 9
3 1 7 4
Sum of only min 4 0 5

In the example, column A has 3 and 1 that are the minimum of row 2 and 3.

Upvotes: 0

Views: 183

Answers (2)

z..
z..

Reputation: 12858

Here's another solution:

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

Upvotes: 1

Martín
Martín

Reputation: 10177

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))))

enter image description here

Upvotes: 1

Related Questions