BYROW Function in Google Sheets

Apply a custom function to each row in an array using the BYROW function.

BYROW Function

The BYROW function in Google Sheets applies a specified LAMBDA function to each row of an array or range.

Syntax

BYROW(array_or_range, LAMBDA)
  • array_or_range: The range or array to apply the function to.
  • LAMBDA: A custom function to apply to each row.

Examples

  1. Basic Example

Apply a custom function to each row in range A1:C3:

=BYROW(A1:C3, LAMBDA(row, AVERAGE(row)))

This calculates the average of each row in the range.

Notes

  • The LAMBDA function defines the operation to perform on each row.
  • BYCOL: Apply a custom function to each column in an array.