Applies a LAMBDA to each row and returns an array of the results. For example, if the original array is 3 columns by 2 rows, the returned array is 1 column by 2 rows.       

Feature available to Office Insiders only This feature is available to Office Insiders only right now.

Syntax

=BYROW(array, lambda(row))

The BYROW function syntax has the following arguments:

  • array      An array to be separated by row.

  • lambda      A LAMBDA that takes a row as a single parameter and calculates one result. The LAMBDA takes a single parameter:

  • row   A row from array.

Errors

Providing an invalid LAMBDA function or an incorrect number of parameters returns a #VALUE! error called "Incorrect Parameters".

Not providing a LAMBDA function or anything but a single value returned from the LAMBDA function returns a #CALC error.

Examples

Example 1: Returns the maximum value of each row of data

Enter the sample data into cells A1:C2, and then copy the formula into cell D4:

=BYROW(A1:C2, LAMBDA(array, MAX(array)))

First BYROW function example

Example 2: returns the maximum value of each squared value of an array using the SUMSQ function

Enter the sample data into cells A1:C2, and then copy the formula into cell D4:

=BYROW(A1:C2, LAMBDA(array, SUMSQ(array)))

Second BYROW function example

See Also

MAP function

REDUCE function

SCAN function

MAKEARRAY function

BYCOL function

ISOMITTED function

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Office Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×