What is BYCOL in Google Sheets?
BYCOL mirrors BYROW but runs a LAMBDA on each column of a range. The result spills across one row with one value per column. Use it for column-wise stats, normalizing monthly blocks, or validating each survey question column.
When to use it
Use BYCOL when you need per-column aggregates or checks on a matrix, such as max per month column in a grid.
When to skip it
Skip BYCOL for row-based records in a standard table. BYROW or simple SUM on rows fits better.
How it works
-
1
Select a range where each column is a series you want to process.
-
2
Write BYCOL(range, LAMBDA(col, ...)) returning one value per column.
-
3
Use TOROW on output if you need a vertical list instead of horizontal spill.
-
4
Combine with MAP when columns differ in length; BYCOL expects a rectangle.
-
5
Document which row is headers so you do not include labels in numeric cols.
-
6
Test LAMBDA on one column manually before wrapping in BYCOL.
Examples in Google Sheets
Column maxes
=BYCOL(B2:M, LAMBDA(c, MAX(c))) returns the highest value in each month column.
Non-empty count
=BYCOL(B2:F, LAMBDA(c, COUNTA(c))) counts entries per survey question column.
Normalize column
=BYCOL(B2:B, LAMBDA(c, (c-MIN(c))/(MAX(c)-MIN(c)))) min-max scales one column vector.
Better Sheets resources
Common mistakes
-
Feeding a tall single-column table expecting BYCOL to walk rows.
-
Including header row in numeric MAX or AVERAGE inside the LAMBDA.
-
Expecting BYCOL to sort columns; it only maps functions.
-
Confusing BYCOL output orientation with TOROW needs.
-
Using BYCOL on ragged columns with uneven lengths.
Frequently asked questions
- BYCOL vs BYROW?
- BYCOL processes each column. BYROW processes each row.
- Can BYCOL return arrays?
- Each LAMBDA should return one scalar per column for standard use.
- BYCOL with headers?
- Start data at row 2 or strip headers inside the LAMBDA.
- BYCOL and TRANSPOSE?
- TRANSPOSE can reshape data before BYROW or BYCOL if orientation is wrong.
- Why one row output?
- BYCOL design returns one result per column across a row spill.
- BYCOL vs MAP?
- MAP works on each cell in a flat array. BYCOL groups by column vectors.
- Empty columns?
- LAMBDA may return 0 or blank depending on your ISBLANK guards.
Related terms
BYROW
BYROW takes an array and a LAMBDA that receives one row at a time. It returns a column of results, one per row. It is the clean way to sum across columns, test row-wide rules, or format composite keys without ARRAYFORMULA hacks.
Read guide →MAP
MAP walks aligned arrays element by element and applies a LAMBDA to each position. Pass one array for unary transforms or several arrays for element-wise combinations. It is the modern replacement for many ARRAYFORMULA column operations.
Read guide →LAMBDA
LAMBDA defines an anonymous function inside a formula. You name parameters, write the calculation, then pass arguments when you call it. Combined with MAP, BYROW, or a named LAMBDA in the Name manager, it replaces fragile copy-paste logic across big tables.
Read guide →REDUCE
REDUCE walks an array left to right, carrying an accumulator value updated by a LAMBDA on each step. It can implement custom aggregates, text joins with rules, or conditional running logic that SUM alone cannot express.
Read guide →Done reading about BYCOL?
Membership unlocks 600+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.