1. Home
  2. Functions
  3. Array
  4. BYCOL

BYCOL function

Applies a LAMBDA to each column of an array and returns one result per column.

Syntax

=BYCOL(array, lambda)

Arguments

ArgumentRequiredDescription
arrayRequiredThe array
lambdaRequiredLAMBDA(column)

How to use BYCOL

When BYCOL returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

BYCOL takes 2 required arguments. Type =BYCOL( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=BYCOL({1,2;3,4}, LAMBDA(c, SUM(c)))Result 1 by 2 array
Spilled result
AB
146

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.