Syntax
| Parameter | Description |
|---|---|
| array | Parameter of the BYCOL function. |
| lambda | Parameter of the BYCOL function. |
Examples
Average of each column
=BYCOL(A1:D100, LAMBDA(col, AVERAGE(col)))
Standard deviation per column
=BYCOL(B2:F50, LAMBDA(c, STDEV(c)))
Count errors per column
=BYCOL(A1:E100, LAMBDA(c, SUMPRODUCT(--(ISERROR(c)))))
Common Errors
The LAMBDA doesn't accept exactly 1 parameter, or returns multiple values instead of a single scalar.
The LAMBDA errors out for one or more columns.
Tips
BYCOL produces a horizontal result — one value per column. Wrap in TRANSPOSE if you need the summary as a vertical list.
Use BYCOL to create a summary row showing min, max, average, or count for each column: place multiple BYCOL formulas in adjacent rows.
=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