Excel REDUCE Function
Chala mitrano — today we learn REDUCE. Read Why → What → How, then try the practice list.
चला मित्रांनो — आज REDUCE शिकू. Why → What → How वाचा, मग practice करा.
चलो दोस्तों — आज REDUCE सीखते हैं। Why → What → How पढ़ो, फिर practice करो।
Purpose
Accumulate a running result across an array with a LAMBDA (fold / aggregate).
Return value
A single value (or whatever your accumulator ends as) after walking the array.
Syntax
Arguments
| Argument | Required? | Description |
|---|---|---|
initial_value | Optional | Starting accumulator (example: 0). |
array | Required | Values to walk. |
lambda | Required | LAMBDA(acc, value) → new acc. |
Version
Microsoft 365 with LAMBDA. Not in older perpetual Excel.
How to use — Why → What → How
Why: SUM is fixed. Sometimes you need a custom running rule (cap, skip blanks, product).
What: REDUCE keeps an accumulator and updates it for each item.
How — numbered steps:
- Start with =REDUCE(0, A2:A10, LAMBDA(acc,v, acc+v)) — same idea as SUM.
- Change the LAMBDA body for custom rules.
- Use initial_value so the first step is clear.
- Test on a tiny range first.
- Prefer SUM/PRODUCT when they already do the job — REDUCE for special logic.
Ravindra Bagale's Tip
Friends, if plain SUM works, use SUM. REDUCE is for custom folds.
Ravindra Bagale's Tip – मराठी
साधा SUM पुरेसे असेल तर SUM वापरा. REDUCE कस्टम नियमसाठी.
Ravindra Bagale's Tip – हिंदी
साधारण SUM काफ़ी हो तो SUM ही लिखो। REDUCE खास नियम के लिए।
Ravindra Bagale's Tip
Always name parameters acc and v (or total, item) so the fold reads clearly.
Ravindra Bagale's Tip – मराठी
Parameter नावे acc, v सारखी स्पष्ट ठेवा.
Ravindra Bagale's Tip – हिंदी
Parameter नाम acc, v जैसे साफ़ रखो।
Worked examples
1) Custom sum
Sales B2:B5.
Result: Total
What it means: Accumulator adds each value.
2) Product of quantities
Pack sizes.
Result: Product
What it means: Initial 1 for multiply.
3) Sum only values over 100 (₹)
Ignore small lines.
Result: Sum of big lines
What it means: Conditional fold.
4) Count non-blanks
Messy list.
Result: Count
What it means: Blank-safe counter.
5) UK running tip pool (£)
Add 10% of each bill into a pot.
Result: Tip pool
What it means: Fold with a rate.
Common errors
Practice tasks (10+)
- Task 1. Reduce a list to a sum with REDUCE (then compare to SUM).Hint: try on a tiny range first
- Task 2. Reduce to a product.Hint: try on a tiny range first
- Task 3. Sum only odd positions using INDEX tricks or helper — or skip with IF.Hint: try on a tiny range first
- Task 4. Count text cells vs numbers.Hint: try on a tiny range first
- Task 5. Build a capped total: stop adding after 10,000.Hint: try on a tiny range first
- Task 6. Explain initial_value for multiply vs add.Hint: try on a tiny range first
- Task 7. Reduce nested with LET for the threshold.Hint: try on a tiny range first
- Task 8. Interview line: when REDUCE beats SUMIF.Hint: try on a tiny range first
- Task 9. Cause a LAMBDA arity error and fix it.Hint: try on a tiny range first
- Task 10. Bonus: REDUCE to concatenate with a comma (careful with length).Hint: try on a tiny range first
Quick quiz
Answers: Q1=True, Q2=True, Q3=False, Q4=True
Related: LAMBDA · LET · GROUPBY · Function hub · Learning path