SCAN Function
Like REDUCE, but shows the running result at every step — perfect for running totals.
Category
Logical
Available in
Microsoft 365, Excel 2024
Returns
A spilled array of every intermediate result
Overview
SCAN works exactly like REDUCE, except it spills every intermediate value instead of only the last one.
That makes it the cleanest way to build running totals, running balances and running maximums with one formula.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| initial_value | Optional | Where the accumulator starts. |
| array | Yes | The values to work through. |
| lambda | Yes | A LAMBDA with two parameters — the accumulator and the current value — that returns the new accumulator. |
Examples
Example 1 — Running total
Show year-to-date sales beside each month.
| A | B | C | |
|---|---|---|---|
| 1 | Month | Sales | To date |
| 2 | Jan | 400 | 400 |
| 3 | Feb | 350 | 750 |
| 4 | Mar | 500 | 1250 |
| 5 | Apr | 275 | 1525 |
Example 2 — Running best
The highest monthly sales figure so far.
Example 3 — Running balance
Apply each month's growth rate and show the balance after every month.
With rates of 5%, 3%, -2% and 4% this spills 1,050, 1,081.50, 1,059.87 and 1,102.26.
Common mistakes
- Text in the array. Adding text gives #VALUE!. Clean the column or wrap the value in N().
Notes

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.