Contact

BYCOL Function in Google Sheets: Syntax, Examples & Troubleshooting

Array Intermediate Google Sheets

Summarize each column with a LAMBDA, compare period totals and filter headings using reproducible Google Sheets examples.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: BYCOL evaluates a rule once for each input column and returns one result per column. Use it to build a horizontal summary without copying a separate aggregation formula across every field.

Availability and version history

  • Introduced: Announced August 24, 2022; the extended rollout was expected to finish by September 26, 2022. Google release history.
  • Availability: Documented in the rolling Google Sheets service. This guide covers ordinary worksheet formulas in the web workflow; it does not establish separate mobile or connected-database behavior.
  • Checked: October 14, 2026, against the official BYCOL reference. Documentation and independent calculations; no native application execution.

Syntax and result shape

=BYCOL(array_or_range,LAMBDA(col,expression))

Both arguments are required. The LAMBDA receives one whole column through one local name and must return one value. Three input columns therefore produce a one-row, three-column result, regardless of the input height. The name col is only a label; it is not a worksheet coordinate.

A separately defined named function may replace the LAMBDA if it has exactly one argument placeholder. Pass that function’s name without following parentheses. The examples here use inline LAMBDAs, so no named-function setup is required.

Prepare a three-period table

Enter these values in A1:C5. Headings occupy row 1; all other cells are numbers. Place result formulas in E2 or another empty area with room to the right.

Period A Period B Period C
12 8 15
9 11 6
14 7 10
5 14 9

The first column totals 40, the second also totals 40, and the third totals 40. Their equal totals are intentional: a second summary can reveal differences that the total conceals.

Example 1: return every column total

=BYCOL(A2:C5,LAMBDA(col,SUM(col)))

The expected result is the horizontal row 40, 40, 40. Only numeric data rows are selected; the headings are not additional observations. BYCOL does not automatically attach them to the result.

For a one-column control, =BYCOL(A2:A5,LAMBDA(col,SUM(col))) returns the single value 40. It is still a per-column operation; the smaller input simply contains one column.

Example 2: compare ranges rather than totals

=BYCOL(A2:C5,LAMBDA(col,MAX(col)-MIN(col)))

The expected row is 9, 7, 9. Period A spans 5–14, Period B spans 7–14, and Period C spans 6–15. These are absolute ranges, not standard deviations or percentage changes.

The calculation reduces each column to one scalar, satisfying BYCOL’s output requirement. Returning col itself would instead ask for several values per column and is not supported by this helper.

Advanced example: select headings using a column-wide test

Suppose an illustrative review rule flags a period if any value is at least 15:

=FILTER(A1:C1,BYCOL(A2:C5,LAMBDA(col,MAX(col)>=15)))

The BYCOL part produces FALSE, FALSE, TRUE. The complete formula returns the single heading Period C. This uses a horizontal condition array to filter a horizontal heading range of the same width.

Changing the threshold to 14 makes all three conditions TRUE, so all three headings are returned. Changing it to 16 produces no matches; the documented Google Sheets FILTER outcome is #N/A. That is FILTER’s empty-result behavior, not a failed BYCOL calculation. See the FILTER guide before adding a fallback message.

Errors and choosing another helper

Google documents #N/A when the LAMBDA has the wrong number of input names. A non-LAMBDA final argument, an invalid identifier such as C1, or an expression returning a nested array also fails. Use one legal local name and check the inner expression on one column first.

Use BYROW for a result per row, or MAP for element-by-element transformations. BYCOL is a reduction across each column; it does not treat every cell as a separate call.

Verification and portability

Check all three totals, all three ranges and the heading test against the supplied numbers. These expectations were independently calculated; no Google Sheets execution is claimed. Formulas use an English-locale comma separator, and output cells must be unobstructed.

The same function name in another spreadsheet does not establish identical named-function setup or error handling. Preserve the dataset and complete output shape when testing an exported workbook. LAMBDA in Sheets explains valid names and the distinction between a definition and a call.

Official reference and testing scope