Array

BYCOL Formula

Applies a LAMBDA function to each column of an array and returns a single-row array of results. BYCOL is the column-wise counterpart of BYROW — it processes one full column at a time, making it perfect for column-level summary statistics like column totals, column averages, or custom per-column aggregations.

Syntax

BYCOL(array, lambda)
ParameterDescription
array Parameter of the BYCOL function.
lambda Parameter of the BYCOL function.
Try BYCOL in Viztab — free, no signup

Examples

Average of each column

Formula
=BYCOL(A1:D100, LAMBDA(col, AVERAGE(col)))
Returns a single row with 4 values — the average of each column in the A1:D100 range.

Standard deviation per column

Formula
=BYCOL(B2:F50, LAMBDA(c, STDEV(c)))
Returns the standard deviation of each column, giving a quick volatility measure across 5 data series.

Count errors per column

Formula
=BYCOL(A1:E100, LAMBDA(c, SUMPRODUCT(--(ISERROR(c)))))
Returns how many error values are in each column. Useful for data quality auditing across a wide dataset.

Common Errors

#VALUE!

The LAMBDA doesn't accept exactly 1 parameter, or returns multiple values instead of a single scalar.

#CALC!

The LAMBDA errors out for one or more columns.

Tips

Returns a row, not a column

BYCOL produces a horizontal result — one value per column. Wrap in TRANSPOSE if you need the summary as a vertical list.

Column summary statistics

Use BYCOL to create a summary row showing min, max, average, or count for each column: place multiple BYCOL formulas in adjacent rows.

Combine with VSTACK for summary table

=VSTACK(data, BYCOL(data, LAMBDA(c, SUM(c)))) appends a totals row at the bottom of your data dynamically.

Try BYCOL in Viztab

Import your data and use BYCOL with 370+ other formulas. No signup required.

Open Viztab

Related Formulas