LogicalExcel 2024

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 reference

Search ExcelTutor