SCAN function

Category: Logical
Introduced: Excel 2024

Summary

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(accumulator, value, body)) The SCAN function syntax has the following arguments and parameters:
• [initial_value] Sets the starting value for the accumulator.
• array An array to be scanned.
• lambda A LAMBDA that is called to reduce the array. The LAMBDA takes three parameters: accumulator The value totaled up and returned as the final result. value The current value from the array. body The calculation applied to each element in the array.
• accumulator The value totaled up and returned as the final result.
• value The current value from the array.
• body The calculation applied to each element in the array.

Example

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

Microsoft Support Page

https://support.microsoft.com/en-us/office/scan-function-d58dfd11-9969-4439-b2dc-e7062724de29

Back to Functions