Excel BYROW Function
Chala mitrano — today we learn BYROW. Read Why → What → How, then try the practice list.
चला मित्रांनो — आज BYROW शिकू. Why → What → How वाचा, मग practice करा.
चलो दोस्तों — आज BYROW सीखते हैं। Why → What → How पढ़ो, फिर practice करो।
Purpose
Run a LAMBDA once per row of an array and spill one result per row.
Return value
A column (usually) of per-row results.
Syntax
Arguments
| Argument | Required? | Description |
|---|---|---|
array | Required | 2D range or array. |
lambda | Required | LAMBDA(row) that returns a single value (or row result). |
Version
Microsoft 365 with LAMBDA.
How to use — Why → What → How
Why: Row totals, row max, or row-level checks without helper columns.
What: Each row is passed as a vector into your LAMBDA.
How — numbered steps:
- Example: =BYROW(B2:D10, LAMBDA(r, SUM(r))).
- Use MAX/MIN/AVERAGE the same way.
- Keep the LAMBDA returning one value per row for a clean column spill.
- Pair with HSTACK to glue results beside the data.
- Test on 3 rows first.
Ravindra Bagale's Tip
BYROW = row-wise; BYCOL = column-wise. Do not mix them up in interviews.
Ravindra Bagale's Tip – मराठी
BYROW = ओळीनुसार; BYCOL = स्तंभानुसार.
Ravindra Bagale's Tip – हिंदी
BYROW = पंक्ति अनुसार; BYCOL = स्तंभ अनुसार।
Ravindra Bagale's Tip
If you need many outputs per row, consider MAP or a wider LAMBDA carefully.
Ravindra Bagale's Tip – मराठी
ओळीत अनेक outputs हवे असतील तर MAP विचार करा.
Ravindra Bagale's Tip – हिंदी
पंक्ति में कई outputs हों तो MAP सोचो।
Worked examples
1) Row totals
Qty table B2:D5.
Result: One total per row
What it means: SUM across each row vector.
2) Row max score
Tests.
Result: Best score each student
What it means: MAX per row.
3) All cells > 0?
Stock checks.
Result: OK/Gap
What it means: Row quality flag.
4) Average spend (£)
Leeds cafe categories.
Result: Row averages
What it means: Currency-friendly ROUND.
5) Count blanks in row
Dirty import.
Result: Blank counts
What it means: Cleaning helper.
Common errors
Practice tasks (10+)
- Task 1. Row SUM for a 5×3 block.Hint: try on a tiny range first
- Task 2. Row MAX and row MIN.Hint: try on a tiny range first
- Task 3. Flag rows where SUM>1000.Hint: try on a tiny range first
- Task 4. BYROW + TEXTJOIN for a row label (advanced).Hint: try on a tiny range first
- Task 5. Compare BYROW SUM vs MMATH on rows.Hint: try on a tiny range first
- Task 6. HSTACK original data with BYROW totals.Hint: try on a tiny range first
- Task 7. Interview: BYROW vs MAP.Hint: try on a tiny range first
- Task 8. Fix arity error in LAMBDA(r, ...).Hint: try on a tiny range first
- Task 9. BYROW on a table column set (structured refs carefully).Hint: try on a tiny range first
- Task 10. Bonus: BYROW with LAMBDA that uses INDEX(r,1).Hint: try on a tiny range first
Quick quiz
Answers: Q1=True, Q2=False, Q3=True, Q4=True
Related: LAMBDA · LET · GROUPBY · Function hub · Learning path