[]
This function scans an array by applying a LAMBDA to each value and returns an array that has each intermediate value.
SCAN([initial_value], array, lambda(accumulator, value))
This function has the following arguments:
Argument | Description |
---|---|
[initial_value] | (Optional) Sets the starting value for the accumulator. |
array | An array to be scanned. |
lambda | A LAMBDA that is called to scan the array. The LAMBDA takes two parameters:
|
Use the initial_value argument to set the starting value for the accumulator parameter. If you are working with text, set the initial value to "".
If an invalid LAMBDA function or an incorrect number of parameters are provided, it returns a #VALUE! error called "Incorrect Parameters".
Returns an array.
SCAN(1, A1:C2, LAMBDA(a,b,a*b))
SCAN("",A1:C2,LAMBDA(a,b,a&b)