SCAN can generate running totals, running counts, and other calculations that create intermediate or incremental results.

The results returned by SCAN are the value of an “accumulator” at each step in the process.

However, while REDUCE returns asinglevalue, SCAN returns anarrayof values.

Excel formula: Count unique dates ignore time

LAMBDA structure

SCAN uses theLAMBDA functionto apply the required calculation.

Thevargument represents the value of each element in thearray.

Thecalculationis a formula that refers to both the accumulator (a) and value (v).

Excel formula: Cash denomination calculator

Note: SCAN returns the value of the accumulator when each element in the array is processed.

The result is an array of “intermediate” values.

Text values

To work with text values, set theinitial_valueto an empty string ("").

Excel formula: Running count of occurrence in list

LET Function

The Excel LET function lets you define named variables in a formula.

BYCOL can apply stock functions like SUM, COUNT, and AVERAGE or a custom LAMBDA function.

BYROW can apply stock functions like SUM, COUNT, and AVERAGE or a custom LAMBDA function.

Excel formula: Dynamic summary count

All results are returned at the same time in a single array….

Excel formula: Longest winning streak

Excel formula: Mortgage payment schedule

Excel formula: Calculate running total

Excel LAMBDA function

Excel LET function

Excel MAP function

Excel SCAN function

Excel REDUCE function

Excel MAKEARRAY function

Excel BYCOL function

Excel BYROW function