Skip to Content

SCAN

Scans an array by applying a LAMBDA to each value and returns an array that has each intermediate value

Syntax

SCAN([initial_value], array, lambda)

Parameters

  • initial_value: Optional. Sets the starting value for the accumulator
  • array: Required. An array to be scanned
  • lambda: Required. A LAMBDA that takes two parameters (accumulator, value) and returns the new accumulator value

Example

=SCAN(0, A1:A5, LAMBDA(acc, val, acc + val))
Returns: ArraySince: Microsoft 365