Logic & Modern Lambdas FormulaGoogle Sheets V8 Engine Verified

Google Sheets BYROW: Calculate Row Summaries Across Multiple Columns

BYROW evaluates a 2D range row by row, passing each horizontal row array to a LAMBDA function and returning a single vertical column of calculated summary values.

Formula Syntax:=BYROW(array, LAMBDA(row, expression))

Formula Parameters & Arguments

ArgumentTypeRequiredDescription
arrayRangeRequiredThe 2D table range (e.g. Q1_Sales!B2:E100).
LAMBDAFunctionRequiredLambda expression receiving each individual row.

Real-World Spreadsheet Examples

Explore verified operational formulas used in enterprise reporting and database workflows:

Example 1: Calculate Sum Across 4 Quarters for Every Row

=BYROW(B2:E100, LAMBDA(r, SUM(r)))
How it works: Outputs total annual sales down Column F in a single dynamic spilled formula.

Example 2: Count Missing Mandatory Cells per Customer Row

=BYROW(A2:H100, LAMBDA(r, COUNTBLANK(r)))
How it works: Audits incomplete data rows across 8 columns instantly.

Example 3: Determine Highest Performing Product per Salesperson

=BYROW(B2:M50, LAMBDA(r, MAX(r)))
How it works: Extracts the peak monthly revenue achieved by each sales rep.

Common Errors & Solutions

❌ #VALUE! Result must be a single value per row
Resolution: The LAMBDA inside BYROW must return 1 value (e.g. SUM, AVERAGE, MAX), not an array.

Performance Pro Tips

  • Pair BYROW with `BYCOL` when you need column totals instead of row totals.

Frequently Asked Questions

Does BYROW recalculate automatically when data changes?

Yes. Google Sheets recalculates all dependent formulas immediately whenever referenced input cells are modified.

Is this formula compatible with Microsoft Excel?

Modern functions like XLOOKUP, FILTER, UNIQUE, SORT, and LET are natively supported in Excel 365. However, QUERY is unique to Google Sheets and uses the Google Visualization API syntax.

Related Google Sheets Formulas