Skip to content
Google Sheets

BYROW function in Google Sheets

Groups an array by rows by application of a LAMBDA function to each row.

=BYROW(array_or_range, LAMBDA)

BYROW syntax and parameters

Two arguments, two required.

  • array_or_rangeanyRequired

    The array or range to group by rows.

  • LAMBDAanyRequired

    A LAMBDA that’s applied to each row in the given array or range to obtain its grouped value. Syntax: LAMBDA(name,formula_expression) Requirements: The LAMBDA must have exactly 1 name argument along with a formula_expression which uses that name. The name resolves to the current row being grouped when the LAMBDA is applied.

BYROW examples

Formulas you'll actually reuse.

  1. A yearly total for each product row:

    =BYROW(B2:M13, LAMBDA(row, SUM(row)))
  2. Flag rows whose best month cleared 10,000:

    =BYROW(B2:M13, LAMBDA(row, IF(MAX(row) > 10000, "Peak", "")))

BYROW in Excel

Same name — your formula ports as-is.

Try BYROW in the playground

Edit the example — nothing to install.

Preloaded with the BYROW formula from Example 1 — change anything and watch it respond.

Loading the editor…