Excel BYROW function


The Excel BYROW function applies a LAMBDA function to each row in a given array and returns an array of the results. This function is particularly useful for performing row-wise calculations on a range of data, enabling you to analyze or summarize each row individually. BYROW is essential for data analysis tasks where operations need to be applied across rows rather than columns, simplifying the handling of multidimensional data in Excel.
					=BYROW(array, lambda(row))
  • array: The array or range to be processed by rows.
  • lambda: The LAMBDA function that takes a row as its parameter and performs calculations to produce a single result per row.
Return value
An array where each element is the result of applying the LAMBDA function to a row in the original array.

How to use

To use BYROW, specify the array you wish to analyze and the LAMBDA function that will operate on each row. The LAMBDA function must accept a single argument representing a row from the array and should return a single value based on that row.


Simple BYROW
Calculating the Total for Each Row: To sum the values in each row of a range.
					=BYROW(range, LAMBDA(row, SUM(row)))
This formula sums the values in each row of the specified range, returning an array of these sums.
BYROW for Maximum Values
Identifying the Largest Number in Every Row: To find the maximum value in each row of a range.
					=BYROW(A1:C2, LAMBDA(row, MAX(row)))

Applies the MAX function to each row within the specified array, returning the maximum value from each row.
BYROW for Minimum Values
Finding the Smallest Value in Each Row: To determine the minimum value in each row.
					=BYROW(A1:C2, LAMBDA(row, MIN(row)))

Utilizes the MIN function within a LAMBDA to identify and return the smallest value from each row in the array.
BYROW for Average Values
Calculating the Average for Each Row: To compute the average value of each row in a range.
					=BYROW(A1:C2, LAMBDA(row, AVERAGE(row)))

This calculates the average of the values in each row, returning an array of average values for the specified range.
BYROW for Row-Wise Summation
Calculating the Total for Each Row: To sum the values in each row.
					=BYROW(A1:C2, LAMBDA(row, SUM(row)))

This example leverages a LAMBDA function within BYROW to sum the values in each row, demonstrating BYROW’s utility for performing row-specific aggregations.

Additional Notes

  • BYROW, when paired with LAMBDA, offers significant flexibility for row-oriented data manipulation and analysis, enabling specific operations to be applied to each row of an array independently.
  • This function facilitates the extraction of insights from rows of data, streamlining the process of performing row-wise calculations in complex data sets.

Related Functions

Excel SCAN function

The Excel SCAN function cumulatively applies a lambda function across an array, generating an array of intermediate results.

Excel BYCOL function

The Excel BYCOL function applies a lambda function to each column in a range or array, streamlining column-based calculations.

Excel LET function

The Excel LET function assigns names to calculation results, simplifying formulas and improving performance by reducing repetition.

Excel MAKEARRAY function

The Excel MAKEARRAY function generates arrays using lambda functions, offering flexibility in array creation and manipulation.

Excel REDUCE function

The Excel REDUCE function aggregates elements of an array, allowing for cumulative calculations and data reduction operations.

Excel LAMBDA function

The Excel LAMBDA function creates custom functions without VBA, enabling complex calculations and reusable formula components.

Content Navigation