Excel BYROW Function Tutorial

Version: Microsoft 365
Last update:
Tip: Use ⬆️ ⬇️ to turn the page up and down. We recommend browsing with a large screen for a better reading experience.

1. Introduction to Excel BYROW

The BYROW function allows you to apply a Lambda function to each row in a range and return an array of results.
Introduction to Excel BYROW

2. BYROW Parameters

Here is the syntax for using the BYROW function.
=BYROW(array, lambda(row))
  • array: required The array or range to which the Lambda function is applied. This can be a single row, multiple rows, or an entire table.
  • lambda: required The Lambda function to apply to each row. The row parameter refers to the row in the array. The Lambda function takes a row parameter and computes a result.
  • 3. Getting Started with the BYROW Function

    Here we take the classic example of calculating the total of a column.

    Keyboard input: =BYROW(
    Getting Started with the BYROW Function

    4. Select the Source Data Range

    At this point, the function prompts you to select the source data range. Click the start of the source data at B5, then hold down the Shift key and click the end of the source data at D7. This way, you can select the contents of the source data and fill them into the function parameter: =BYROW(B5:D7.
    Select the Source Data Range

    5. SUM as a Lambda Function

    Here we pass in the Lambda function for column processing. Excel will intelligently suggest a series of functions that can be passed in, all designed for processing a column of data. Here we choose SUM as the Lambda function.
    SUM as a Lambda Function

    6. Almost Finished

    After passing in the SUM function and adding the closing parenthesis, the call to the BYROW function is complete.
    Almost Finished

    7. BYROW Function Takes Effect

    Press Enter, and we can see that the total has been successfully calculated for each row.
    BYROW Function Takes Effect

    8. Abbreviation of Lambda Functions

    Some may wonder why the second parameter requires a Lambda function, but passing SUM works too? Actually, the current call is equivalent to:

    =BYROW(B5:D7, LAMBDA(row, SUM(row))).
    Abbreviation of Lambda Functions

    9. Using in Combination with Other Functions

    Similarly, we can combine other functions as Lambda functions to use.

    For example, here we use SUM + LEN to count the number of characters: =BYROW(B10:D12, LAMBDA(row, SUM(LEN(row))))
    Using in Combination with Other FunctionsUsing in Combination with Other Functions

    10. 🎉 Finish! 🎉

    Author's Note: I hope you can feel the effort I put into these tutorials. I hope to create a series of very easy-to-understand Excel tutorials.

    If it is useful, help me share these tutorials, thank you!


    Follow me:
    Introduction to Excel BYROW