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.
Syntax =BYROW(array, lambda)
=BYROW(A1:B2,LAMBDA(row,SUM(row)))Arguments
| Name | Required | What to pass |
|---|---|---|
| array | Required | The rows to process. |
| lambda | Required | A 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
| A | B | C | |
|---|---|---|---|
| 1 | 10 | 20 | 30 |
| 2 | 5 | 7 | 12 |
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.