BYROW Function in Excel: Apply a Calculation to Each Row

⏱ 1 min readUpdated 28 September 2026

LogicalLevel: ExpertAvailable in: Excel 365 / 2021+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Related functions

BYROW runs a LAMBDA on each row of an array and returns one result per row — row totals, row maximums, row checks.

Syntax

=BYROW(array, LAMBDA(row, calculation))
Argument What it means
LAMBDA(row, …) What to do with each row.

Examples

Example 1

=BYROW(B2:M20, LAMBDA(r, SUM(r)))

Yearly total for every product.

Example 2

=BYROW(B2:M20, LAMBDA(r, COUNTIF(r, 0)))

Months with zero sales per product.

BYCOL · LAMBDA · MAP

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong