Excel SCAN Function
Chala mitrano — today we learn SCAN. Read Why → What → How, then try the practice list.
चला मित्रांनो — आज SCAN शिकू. Why → What → How वाचा, मग practice करा.
चलो दोस्तों — आज SCAN सीखते हैं। Why → What → How पढ़ो, फिर practice करो।
Purpose
Like REDUCE, but spills every intermediate accumulator value (running total style).
Return value
An array of running results, one per input item.
Syntax
Arguments
| Argument | Required? | Description |
|---|---|---|
initial_value | Optional | Starting accumulator. |
array | Required | Values to scan. |
lambda | Required | LAMBDA(acc, value) → new acc (returned at each step). |
Version
Microsoft 365 with LAMBDA.
How to use — Why → What → How
Why: Managers love running totals month by month — SCAN spills them in one formula.
What: Each step stores the accumulator so far into the spill grid.
How — numbered steps:
- Try =SCAN(0, B2:B7, LAMBDA(a,v, a+v)).
- Compare to a helper column with expanding SUM.
- Use charts on the SCAN output for a trend of the running total.
- Combine with ROUND for currency.
- Clear spill blockers below.
Ravindra Bagale's Tip
SCAN = “show every step”; REDUCE = “show only the end”.
Ravindra Bagale's Tip – मराठी
SCAN = प्रत्येक पाऊल दाखवा; REDUCE = फक्त शेवट.
Ravindra Bagale's Tip – हिंदी
SCAN = हर कदम दिखाओ; REDUCE = सिर्फ़ आखिर।
Ravindra Bagale's Tip
Put SCAN in its own column so #SPILL! is easy to see.
Ravindra Bagale's Tip – मराठी
SCAN वेगळ्या column मध्ये ठेवा.
Ravindra Bagale's Tip – हिंदी
SCAN अलग column में रखो।
Worked examples
1) Running sales total (₹)
Daily sales.
Result: Running totals
What it means: Each row is sum so far.
2) Running count of orders
Ones and zeros.
Result: Cumulative count
What it means: Same pattern.
3) Running balance after expenses
Start 5000.
Result: Balance after each spend
What it means: Initial cash then subtract.
4) UK cafe running covers (£)
Covers per hour.
Result: Cumulative covers
What it means: Works with any numeric list.
5) Running max
Track peak.
Result: Peak so far
What it means: Not only sums — any fold.
Common errors
Practice tasks (10+)
- Task 1. Build a running total for 12 months.Hint: try on a tiny range first
- Task 2. Running balance with opening cash.Hint: try on a tiny range first
- Task 3. Running max and running min side by side.Hint: try on a tiny range first
- Task 4. Chart the SCAN output.Hint: try on a tiny range first
- Task 5. Compare SCAN vs partial SUM.$A$2:A2 style.Hint: try on a tiny range first
- Task 6. SCAN percentages of a fixed total using LET.Hint: try on a tiny range first
- Task 7. Explain SCAN vs REDUCE in one sentence.Hint: try on a tiny range first
- Task 8. Fix a #SPILL! under SCAN.Hint: try on a tiny range first
- Task 9. SCAN with ROUND(...,2) for ₹.Hint: try on a tiny range first
- Task 10. Bonus: SCAN of MAP output.Hint: try on a tiny range first
Quick quiz
Answers: Q1=True, Q2=True, Q3=True, Q4=False
Related: LAMBDA · LET · GROUPBY · Function hub · Learning path