What is BYROW in Google Sheets?

BYROW takes an array and a LAMBDA that receives one row at a time. It returns a column of results, one per row. It is the clean way to sum across columns, test row-wide rules, or format composite keys without ARRAYFORMULA hacks.

When to use it

Use BYROW when logic needs values from several columns in the same row, like scoring surveys or building SKU labels from part fields.

When to skip it

Skip BYROW for column-only operations. BYCOL or MAP on a single column is simpler.

How it works

  1. 1

    Select the rectangular data range including all columns the LAMBDA will read.

  2. 2

    Write BYROW(range, LAMBDA(row, ...)) where row is one horizontal array.

  3. 3

    Return one scalar per row from the LAMBDA body.

  4. 4

    Use TOCOL or INDEX inside the LAMBDA when you need specific positions in the row vector.

  5. 5

    Leave spill space in the output column.

  6. 6

    Name complex LAMBDA bodies with LET for maintainability.

Examples in Google Sheets

Row total flag

=BYROW(C2:F, LAMBDA(r, IF(SUM(r)>500, "Bonus", ""))) marks rows whose four columns sum above 500.

Composite key

=BYROW(A2:C, LAMBDA(r, TEXTJOIN("-", TRUE, r))) builds keys from three columns per row.

Pass fail

=BYROW(D2:G, LAMBDA(r, AND(r>=70))) checks whether every exam column in the row is at least 70.

Build this without starting from a blank cell

Use a Better Sheets tool for BYROW, then watch a walkthrough when you want the full pattern.

Better Sheets resources

Common mistakes

  • Expecting BYROW to return multiple columns; it returns one value per row unless you return an array.
  • Passing a single column range when you meant multi-column rows.
  • Using BYROW on headers row included in range.
  • Nested BYROW without understanding spill direction.
  • Replacing simple =SUM(C2:F2) drag with BYROW without a readability win.

Frequently asked questions

BYROW vs ARRAYFORMULA?
BYROW is clearer for per-row custom logic. ARRAYFORMULA still works for many legacy patterns.
BYROW vs BYCOL?
BYROW walks horizontal rows. BYCOL walks vertical columns.
Can BYROW return text?
Yes. Any single value per row is allowed.
How to access column 3 in row?
Use INDEX(row, 1, 3) inside the LAMBDA parameter.
BYROW with FILTER?
FILTER first, then BYROW on the filtered array.
Why #REF!?
Blocked spill or invalid LAMBDA syntax.
BYROW performance?
Large tables with heavy LAMBDA bodies may recalc slowly.

Related Tutorials

Watch how BYROW works

Browse more tutorials
How to Insert Multiple Rows in Google Sheets (Easy to Hard)

How to Insert Multiple Rows in Google Sheets (Easy to Hard)

Learn how to add multiple rows to your google sheets by hand, and automa...
Spreadsheet Automation 101 Lesson 1: A1 Notation vs Row,Column Syntax

Spreadsheet Automation 101 Lesson 1: A1 Notation vs Row,Column Syntax

Make A1 not so limited. Learn more about A1 Notation and how it can be c...

Related blog posts

Guides that explain BYROW in more depth.

Browse the blog

Related glossary terms

Done reading about BYROW?

Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.

Need this once

Jump to a free tool or a single tutorial for this topic.

Learning Sheets for real

Unlock the full library, generators, and templates with membership.