FormulaCamp
Completed
← Google Sheets functions
Google Sheets function

BYCOL in Google Sheets

BYCOL hands each column of a range to your LAMBDA in Google Sheets and gives back a row of results.

Syntax (same in Google Sheets)

BYCOL(array, LAMBDA(column))

Wrap it in TRANSPOSE if you want the results listed down a column instead.

For a fuller explanation of the arguments and common errors, see the BYCOL Excel guide.

Worked examples in Google Sheets

Highest per column, shown downward

ABC
1Q1Q2Q3
210205
3739

Formula: E2: =TRANSPOSE(BYCOL(A2:C3,LAMBDA(c,MAX(c))))

Result: Spills down: 10, 20, 9

BYCOL returns a row; TRANSPOSE turns it into a column listing 10, 20 and 9.

Column totals as text

ABC
1Q1Q2Q3
210205
3739

Formula: E2: =TEXTJOIN(",",,BYCOL(A2:C3,LAMBDA(c,SUM(c))))

Result: 17,23,14

The three column totals are joined into one string.

The best of the column minimums

ABC
1Q1Q2Q3
210205
3739

Formula: E2: =MAX(BYCOL(A2:C3,LAMBDA(c,MIN(c))))

Result: 7

The column minimums are 7, 3 and 5, and the largest of them is 7.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =BYCOL(C2:D7,LAMBDA(c,MAX(c)))

Example spreadsheet for BYCOL
ABCDEFG
1RegionProductUnitsPriceResult
2EastPen1202.512025
3WestPen802.5
4EastBook4512
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: 120

Frequently asked questions

Why does BYCOL return its results across a row in Google Sheets?
It returns one value per column, so the output has one cell for each source column. Use TRANSPOSE around it to turn the row into a column.

Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.