BYROW Function

Runs a LAMBDA on each row of a range and returns one result per row.

Category

Logical

Available in

Microsoft 365, Excel 2024

Returns

A spilled column, one result per row

Taught hands-on in Level 5: Expert Techniques & Workbook Architecture - Modern Functions module

Overview

BYROW hands your LAMBDA one whole row at a time. Whatever single value the LAMBDA returns becomes that row's answer.

It's a one-formula way to get row totals, row maximums, or a TRUE/FALSE check per row.

Syntax

=BYROW(array, lambda(row)) Explain

Arguments

ArgumentRequired?What it does
arrayYesThe range to work through, row by row.
lambdaYesA LAMBDA with one parameter (the row) that returns a single value.

Examples

Example 1 — Total per rep

Add up each rep's three quarters.

E2fx=BYROW(B2:D5, LAMBDA(r, SUM(r)))
ABCDE
1RepQ1Q2Q3Total
2Ana120150130400
3Ben90110100300
4Cara200180220600
5Dev809575250
=BYROW(B2:D5, LAMBDA(r, SUM(r))) Explain

Example 2 — Did every quarter reach 100?

AND works on the whole row here, because BYROW passes one row at a time.

=BYROW(B2:D5, LAMBDA(r, AND(r>=100))) Explain

Returns TRUE for Ana and Cara, FALSE for Ben (90 in Q1) and Dev.

Common mistakes

  • #CALC! errors. The LAMBDA returned more than one value for a row. BYROW needs exactly one result per row.

Notes

  • In current Microsoft 365 you can pass a function name directly: =BYROW(B2:D5, SUM).
  • Related functions: BYCOL, MAP, LAMBDA, REDUCE.
Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.