
LogicalLevel: ExpertAvailable in: Excel 365 / 2021+
In this article
- Syntax
- Examples
- Example 1
- Example 2
- Related functions
SCAN walks through an array carrying an accumulator and returns every intermediate result — running totals, running balances, running max.
Syntax
=SCAN(initial_value, array, LAMBDA(acc, value, calculation))
| Argument |
What it means |
initial_value |
Starting accumulator, often 0. |
Examples
Example 1
=SCAN(0, C2:C366, LAMBDA(a, v, a+v))
Running total of daily sales.
Example 2
=SCAN(B1, C2:C50-D2:D50, LAMBDA(a, v, a+v))
Running bank balance from credits and debits.
REDUCE · MAP · SUM
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong