How to Use REDUCE Function in Excel + Tips

Learn how to use REDUCE function in Excel step-by-step to swap or insert text based on position with simple examples.

Advertisement
Formula
=REDUCE(initial_value, array, lambda)

Hello everyone! Today I show you how to use REDUCE function in Microsoft Excel 365 step by step with simple example.

You ever want to loop through a list and build up one single result from all the item? Like add all number together, or combine all text into one sentence? Normally you use SUM or CONCAT for basic thing. But REDUCE let you do custom loop with your own formula — very powerful for advance task!


1. What is REDUCE Function in Excel?

REDUCE function go through every item in your array one by one, apply a LAMBDA formula, and accumulate the result into one single value.

Think of REDUCE like a snowball rolling down a hill. It start small (initial value), then every item it pass, it pick up more and grow bigger. At the end, you get one big final result.

Why REDUCE is useful:

  1. Build running total — Add, multiply, or combine result step by step
  2. Custom accumulation — Do any calculation you want, not just SUM
  3. Work great with LAMBDA — You control exactly what happen at each step

📚 Related Tutorial: REDUCE use LAMBDA inside it. Make sure you understand LAMBDA first! Check out How to Use LAMBDA Function in Excel!


2. Formula Syntax & Parameters

=REDUCE(initial_value, array, lambda)
  • initial_value — Required. The starting value before REDUCE begin loop. Often 0 for number or "" for text.
  • array — Required. Your range or array that REDUCE will loop through. Example: A2:A10
  • lambda — Required. A LAMBDA function with two parameter: first is accumulator (running result), second is current item.

Important: Inside the LAMBDA, first parameter is always your running result so far, second parameter is the current item in the loop.


3. Practical Examples

Example 1: Add All Number Together (Like SUM)

You have number in A2:A6 and want add them all together with REDUCE:

=REDUCE(0, A2:A6, LAMBDA(acc, x, acc + x))

👉 Result: If A2:A6 have 10, 20, 30, 40, 50 — REDUCE return 150.

How it work step by step:

  • Start with 0
  • Step 1: 0 + 10 = 10
  • Step 2: 10 + 20 = 30
  • Step 3: 30 + 30 = 60
  • Step 4: 60 + 40 = 100
  • Step 5: 100 + 50 = 150 ✅

💡 Tip: For simple sum, just use =SUM() — it faster. Use REDUCE when your accumulation logic is more complex than what SUM can do.


Example 2: Multiply All Number Together (Running Product)

You want multiply all number in A2:A5 together:

=REDUCE(1, A2:A5, LAMBDA(acc, x, acc * x))

👉 Result: If A2:A5 have 2, 3, 4, 5 — REDUCE return 120 (2×3×4×5).

Note: For multiply, initial value must be 1 not 0. If you start with 0, multiply with anything still 0!


Example 3: Combine All Text with Separator

You have name list in A2:A5 and you want join all name together with comma separator:

=REDUCE("", A2:A5, LAMBDA(acc, name, IF(acc="", name, acc & ", " & name)))

👉 Result: If A2:A5 have John, Mary, Tom, Lisa — REDUCE return "John, Mary, Tom, Lisa" as one text string.

The IF inside check if accumulator is empty (first item), then just use the name. For next item, add comma then the name.

💡 Tip: For simple text join, use =TEXTJOIN() instead. Use REDUCE when you need custom logic for each step, like skip empty cell or add condition.


Example 4: Find the Largest Number (Like MAX)

You want find biggest number in A2:A6 using REDUCE:

=REDUCE(A2, A3:A6, LAMBDA(acc, x, IF(x > acc, x, acc)))

👉 Result: REDUCE compare each number with current max. At the end, return the biggest number. Same result as =MAX(A2:A6) but you build the logic yourself!


Advertisement

4. REDUCE vs SUM/TEXTJOIN — When to Use?

SUM / TEXTJOINREDUCE
Use forSimple add or joinCustom accumulation logic
Can add condition?LimitedYes, full control with LAMBDA
Easy to write?Very easyMore complex
Need LAMBDA?NoYes
Work on old Excel?YesNo (365 only)

Simple rule: Use SUM, MAX, TEXTJOIN for normal task. Use REDUCE when you need custom step-by-step logic that normal function cannot do.


💡 Quick Tips for Using REDUCE Function

  1. Start value is very important: For addition use 0, for multiplication use 1, for text use "". Wrong start value will give wrong result.
  2. First LAMBDA parameter is accumulator: Inside LAMBDA, always remember first parameter = running result so far, second parameter = current item in loop.
  3. Use IF inside LAMBDA for condition: You can put IF, AND, OR inside LAMBDA to add condition at each step — very powerful!
  4. Test with small data first: REDUCE can be hard to debug. Test with 3-4 item first before apply to big range.
  5. Excel Version Requirement: REDUCE function require Microsoft 365 or Excel for the Web. Not available in Excel 2021 or older.

📚 Related Resources & Tutorials

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement