SCAN
Keep every intermediate value of an accumulating calculation.
Syntax
=SCAN([initial_value], array, lambda)Worked example
Keep the running total after each new item.
=SCAN(0,{2;4;6},LAMBDA(total,item,total+item))Result 2; 6; 12 (three rows)
Microsoft documentation
Check the arguments, supported editions and behavior of this function in Microsoft’s reference.
Microsoft referenceExcel SCAN Function is Shockingly Powerful! [Step-by-Step]
Practice SCAN
Start at zero and return a running total for each amount in A2:A4.
| A | B | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 |
Show example formula
=SCAN(0,A2:A4,LAMBDA(total,item,total+item)) Lesson quiz
Answer three questions to see your level in this lesson.
