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

BYROW function

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

Syntax

=BYROW(array, lambda)

Arguments

ArgumentRequiredDescription
arrayRequiredThe array
lambdaRequiredLAMBDA(row)

How to use BYROW

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

BYROW takes 2 required arguments. Type =BYROW( 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.

=BYROW({1,2;3,4}, LAMBDA(r, SUM(r)))Result 2 by 1 array
Spilled result
A
13
27

Every formula, right in your browser

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