What is BYCOL in Google Sheets?

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. 1

    Select a range where each column is a series you want to process.

  2. 2

    Write BYCOL(range, LAMBDA(col, ...)) returning one value per column.

  3. 3

    Use TOROW on output if you need a vertical list instead of horizontal spill.

  4. 4

    Combine with MAP when columns differ in length; BYCOL expects a rectangle.

  5. 5

    Document which row is headers so you do not include labels in numeric cols.

  6. 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.

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