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
Select the rectangular data range including all columns the LAMBDA will read.
-
2
Write BYROW(range, LAMBDA(row, ...)) where row is one horizontal array.
-
3
Return one scalar per row from the LAMBDA body.
-
4
Use TOCOL or INDEX inside the LAMBDA when you need specific positions in the row vector.
-
5
Leave spill space in the output column.
-
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.
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
How to Insert Multiple Rows in Google Sheets (Easy to Hard)
Spreadsheet Automation 101 Lesson 1: A1 Notation vs Row,Column Syntax
Related blog posts
Guides that explain BYROW in more depth.
Beginners Guide to Using Index, Row, and Column | Simply useful Google Sheets Formulas
You may be using Google Sheet to do math and find that you need to iterate a number. ROW() gets you the row you're on, and helps you with this.
Read post →Automate Row Deletion in Google Sheets with Apps Script
In this post, we'll cover how to remove rows automatically in Google Sheets using Apps Script, ensuring you save time and streamline your spreadsheet management. You're probably already familiar with the manual way of right-clicking and deleting rows, but there's a more efficient way to handle this—automation! Manual versus Semi-Automatic Deletion You may know that you can manually delete rows in Google Sheets by right-clicking and selecting "Delete row." You can even select multiple rows...
Read post →How to create a formula for every row in a column in a Google Spreadsheet?
3 possible ways to create a formula for every row in a column in a Google Spreadsheet. And two bonus ways to make it look nicer. - Auto fill - Double Click - ArrayFormula
Read post →Related terms
BYCOL
BYCOL mirrors BYROW but runs a LAMBDA on each column of a range. The result spills across one row with one value per column. Use it for column-wise stats, normalizing monthly blocks, or validating each survey question column.
Read guide →MAP
MAP walks aligned arrays element by element and applies a LAMBDA to each position. Pass one array for unary transforms or several arrays for element-wise combinations. It is the modern replacement for many ARRAYFORMULA column operations.
Read guide →LAMBDA
LAMBDA defines an anonymous function inside a formula. You name parameters, write the calculation, then pass arguments when you call it. Combined with MAP, BYROW, or a named LAMBDA in the Name manager, it replaces fragile copy-paste logic across big tables.
Read guide →REDUCE
REDUCE walks an array left to right, carrying an accumulator value updated by a LAMBDA on each step. It can implement custom aggregates, text joins with rules, or conditional running logic that SUM alone cannot express.
Read guide →Done reading about BYROW?
Membership unlocks 600+ 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.