# SCAN

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function scans an array by applying a [LAMBDA](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/functionLambda) to each value and returns an array that has each intermediate value.

## Syntax

SCAN ([initial\_value], array, lambda(accumulator, value))

## Argument

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: *accumulator*: The value totaled up and returned as the final result. *value*: The calculation applied to each element in the array. |

## Remarks

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".

## Data Types

Returns an array.

## Examples

`SCAN(1, A1:C2, LAMBDA(a,b,a*b))`
`SCAN("",A1:C2,LAMBDA(a,b,a&b))`

## Version Available

This function is available in product version 15 or later.