Function · LAMBDA

Excel BYROW function

The Excel BYROW function runs a LAMBDA on each row. The row 10 and 20 sums to 30. The row 5 and 7 sums to 12.

Microsoft 365 and Excel 2024, including Excel for the web. Also in Google Sheets. Excel 2021 does not have it.

Syntax =BYROW(array, lambda)

BYROW
=BYROW(A1:B2,LAMBDA(row,SUM(row)))

Arguments

NameRequiredWhat to pass
arrayRequiredThe rows to process.
lambdaRequiredA LAMBDA that takes one row and returns one value. BYROW spills those values down a column.

Examples

A sum for each of two rows

=BYROW(A1:B2,LAMBDA(row,SUM(row)))

Result 30 and 12

=BYROW(A1:B2,LAMBDA(row,SUM(row)))C1
Rows
ABC
1102030
25712
A picture of the sheet, not a live calculator. C2 is the spill. The LAMBDA's parameter is the whole row, not one cell.

BYROW hands each row to a LAMBDA and spills one result per row. SUM of 10 and 20 is 30. SUM of 5 and 7 is 12. The parameter is the whole row, so SUM, MAX, or another row-shaped calculation belongs inside the LAMBDA. A LAMBDA that returns two numbers for one row does not fit the single column BYROW spills.

MAP is the per-cell version. BYCOL is the same idea down each column. MAKEARRAY builds a new grid from the row number and the column number. Two base rents of $1,200 and $1,450, plus $50 each month, spill a 3 by 2 grid on that page. On the BYCOL page, nine cities across the months of 1/1/2026 through 4/1/2026 sum to $16,080, $19,200, $17,850, and $19,690. Excel 2021 does not have BYROW. A plain SUM of A1:B2 would return 42, the total of both rows, which is a different question.