How to Use BYROW and BYCOL Functions in Excel 365 with Practical Examples

🧠 What Are BYCOL and BYROW Functions in Excel 365?

BYCOL and BYROW are part of the Lambda helper functions in Excel 365. These functions allow you to apply custom logic across columns or rows of a range or array, making them incredibly useful for dynamic and reusable calculations.


🔹 1. BYROW Function

Purpose:

Processes data row by row, applying a specified Lambda function to each row.

📘 Syntax:

excelCopyEdit=BYROW(array, lambda(row))
  • array: The data range you want to process.
  • lambda(row): A custom calculation to perform on each row.

🧪 Example: Sum each row in a range

You have this data in cells A2:C4:

ABC
235
142
627

👉 Formula:

excelCopyEdit=BYROW(A2:C4, LAMBDA(r, SUM(r)))

✅ Output:

Sum
10
7
15

Each row is summed individually and spilled vertically.


🔹 2. BYCOL Function

Purpose:

Processes data column by column, applying a specified Lambda function to each column.

📘 Syntax:

excelCopyEdit=BYCOL(array, lambda(column))
  • array: The data range you want to process.
  • lambda(column): A custom calculation to perform on each column.

🧪 Example: Find the average of each column

Same data in A2:C4:

ABC
235
142
627

👉 Formula:

excelCopyEdit=BYCOL(A2:C4, LAMBDA(c, AVERAGE(c)))

✅ Output:

Average
3.0
3.0
4.67

Each column’s average is calculated and spilled horizontally.


🔁 When to Use BYROW and BYCOL?

Use CaseUse Function
Sum or average of each rowBYROW
Custom logic applied to each columnBYCOL
Conditional check row-wiseBYROW + IF
Min/max/median by columnBYCOL

💡 More Practical Examples

🎯 Count how many values > 3 in each row:

excelCopyEdit=BYROW(A2:C4, LAMBDA(r, COUNTIF(r, ">3")))

🎯 Find max value in each column:

excelCopyEdit=BYCOL(A2:C4, LAMBDA(c, MAX(c)))

⚠️ Requirements

  • Available in Excel 365 and Excel 2021 only
  • Must use LAMBDA function inside

🚀 Want to Automate This Logic?

If you’re excited by what BYCOL and BYROW can do with formulas, imagine how much more powerful Excel becomes when you can automate this logic using VBA macros.

Instead of manually applying formulas, you could:

  • Automatically summarize each row/column with a button click
  • Dynamically format top values
  • Export row/column summaries to reports

🎓 Master Excel Automation with VBA (Beginner-Friendly)

📘 Mastering Excel Automation – Excel VBA Training Course

🔑 Why Learn VBA?

  • Eliminate repetitive tasks
  • Build powerful Excel tools
  • Automate complex logic (like BYROW/BYCOL) programmatically

🎬 Course Highlights:

  • 42 easy-to-follow videos
  • 4 hours 8 minutes total
  • ₹441 only (Limited-time offer, originally ₹1,299)
  • Lifetime access

🎯 Designed for non-programmers and Excel enthusiasts alike!

🔗 👉 Enroll today and start automating Excel your way


On sale products