# SCAN

## Content

This function scans an array by applying a [LAMBDA](/document-solutions/dot-net-excel-api/docs/online/Features/ManageFormulas/lambda-functions) to each value and returns an array that has each intermediate value.

## Syntax

`SCAN([initial_value], array, lambda(accumulator, value, body))`

## Arguments

| Argument | Description |
| -------- | ----------- |
| *[initial\_value]* | [Optional] Sets the starting value for the accumulator. |
| *array* | [Required] An array to be scanned. |
| *lambda* | [Required] A LAMBDA that is called to reduce the array. The LAMBDA takes three parameters:<ul><li>*accumulator*    The value totaled up and returned as the final result.</li><li>*value*     The current value from the array.</li><li>*body*     The calculation applied to each element in the array.</li></ul> |

## Example

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