Google Sheets BYROW Function: Syntax, Examples & Tips

The BYROW function applies a specified formula to each row of a given array, returning an array of results based on those calculations.
Google Sheets
BYROW(array_or_range, LAMBDA)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is BYROW?
  3. A Practical Example
  4. BYROW Formula
  5. Result of the Formula
  6. Why Use BYROW?
  7. Key Takeaways:
  8. Example use case

Parameters

array_or_range:
The range of cells or array that you want to process with the specified LAMBDA function.

LAMBDA:
A custom function that you define to operate on each row of the specified array_or_range. This function can take parameters and return a value based on the input from each row.

What is BYROW?

The BYROW function in Google Sheets is a powerful tool that allows you to apply a specified function to each row of a given array or range. This function is particularly useful for performing calculations or transformations on each row of data without the need for complex formulas or manual entry. BYROW simplifies the process of working with row-wise operations, making it easier to analyze and manipulate data.

In simpler terms, BYROW enables you to execute a function across all rows of a dataset, returning an array of results based on the specified operation.

A Practical Example

Imagine you are managing a sales report stored in a Google Sheets spreadsheet:

Sales Data Table:

SaleIDProductNameQuantityPrice
1Widget A325.00
2Widget B530.00
3Widget C215.00

You want to calculate the total sales for each product by multiplying the quantity sold by the price.

BYROW Formula

To achieve this, you would use the BYROW function combined with a lambda function as follows:

Google Sheets
=BYROW(A2:D4, LAMBDA(row, row[Quantity] * row[Price]))

In this formula:

  • A2:D4 is the range containing your sales data.
  • LAMBDA(row, row[Quantity] * row[Price]) defines a lambda function that takes each row as input and calculates the total sales by multiplying the quantity by the price.

Result of the Formula

When you apply the BYROW formula to the Sales Data Table, the output would look like this:

SaleIDProductNameQuantityPriceTotal Sales
1Widget A325.0075.00
2Widget B530.00150.00
3Widget C215.0030.00

In this case, the BYROW function calculates the total sales for each product and adds a new column to the table.

Why Use BYROW?

BYROW is beneficial because it streamlines the process of performing row-wise calculations in Google Sheets. It eliminates the need for repetitive formulas and allows for cleaner, more efficient data manipulation. Additionally, it enhances the readability of your spreadsheet by consolidating complex calculations into a single function.

Key Takeaways:

  • BYROW: A modern Google Sheets function that applies a specified function to each row of a given array or range.
  • Efficiency: Simplifies row-wise calculations, reducing the need for complex formulas.
  • Versatility: Can be used with various functions, making it suitable for different data analysis tasks.
  • Common Use Cases: Ideal for sales reports, financial analysis, and any scenario where row-wise calculations are necessary.

BYROW is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance data analysis and reporting capabilities.

Happy spreadsheeting!

Example use case

You have a table with sales data where each row represents a different product. Using BYROW, you can calculate the total sales for each product by summing the sales figures across multiple columns, providing a quick overview of product performance.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.