BYROW Function

Excel 365

Summary

The BYROW function applies a LAMBDA function to each row of an array, returning an array containing the results from each row. This enables row-wise processing of data arrays, transforming entire rows based on custom logic.

Syntax

BYROW(array, lambda(row))

Parameters

Parameter Type Required Description
array Array Yes Input array to be separated and processed by row
lambda LAMBDA Yes LAMBDA function with single 'row' parameter that returns one value per row

Using the BYROW Function

BYROW revolutionizes array processing by enabling row-specific calculations without helper columns or complex array formulas. Pair it with LAMBDA to perform operations like finding maximums, sums of squares, averages, or any custom logic across each row of your data.

Common BYROW Examples

Find Maximum Value in Each Row

=BYROW(A1:C10, LAMBDA(row, MAX(row)))

Returns the maximum value from each row in the range A1:C10. Perfect for identifying row peaks.

Sum of Squared Values per Row

=BYROW(A1:C10, LAMBDA(row, SUMSQ(row)))

Calculates the sum of squared values for each row, useful for statistical variance calculations.

Row Averages with Custom Logic

=BYROW(A1:D10, LAMBDA(row, AVERAGE(IF(row>0, row))))

Computes average of positive values only in each row, ignoring zeros or negatives.

Frequently Asked Questions

BYROW requires LAMBDA to return exactly one value per row. Multiple values cause #CALC! error.

Yes, BYROW passes the actual row content including empties to LAMBDA, which can handle them appropriately.

BYROW processes rows individually; BYCOL processes columns individually.

Common Errors and Solutions

#VALUE! - Incorrect Parameters

Cause: LAMBDA has wrong number of parameters or invalid syntax

Solution: Ensure LAMBDA takes exactly one parameter named 'row'

#CALC!

Cause: LAMBDA doesn't return a single value or no LAMBDA provided

Solution: Verify LAMBDA returns exactly one result per row

#VALUE! - Invalid array

Cause: First argument is not a valid array or range

Solution: Use proper array/range reference

Notes

  • Output array has same number of rows as input, but only 1 column
  • Works with dynamic arrays and spilled ranges
  • Combine with MAP for element-wise operations
  • Use ISOMITTED within LAMBDA to handle missing values
  • Only available in Excel 365/2021 with LAMBDA support

Compatibility

Available in: Excel 365

Not available in: Excel 2021 (limited), Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2003

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 365