SCAN

SCAN (initial_value, array, function)

Returns the array after applying a LAMBDA function to each value and returns an array.

initial_value(Optional) Sets the starting value for the accumulator.
arrayAn array to be scanned.
functionThe LAMBDA function: lambda(accumulator, value)

REMARKS
* This function was added in Excel 2024.
* This function can create a Dynamic Array Formula.
* This function uses the LAMBDA function.
* This LAMBDA function must take two parameters.
* This LAMBDA function must have parameter names that do not include numbers.
* If the array is text, set "initial_value" to "".
* The "accumulator" value totalled up and returned as the final result.
* The "value" calculation applied to each element in the array.
* The Eta Reduced Lambda syntax cannot be used here because there are multiple arguments that need to be passed.
* You can use the MAP function to return an identical array by applying a LAMBDA function to do some processing.
* You can use the REDUCE function to return a single value after applying a LAMBDA function to an array.
* This function was first released in July 2021.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 ABCDE
1=SCAN(1 ,C1:B2, LAMBDA(p_one, p_two, p_one&p_two) = {"a", "ab", "abc"; "abcd"} abc
2=SCAN(1, C1:E2, LAMBDA(p_one, p_two, p_one&p_two) = {"a", "ab", "abc"; "abcd", "abcde", "abcdef"} def
3=SCAN(1, C3:E4, LAMBDA(p_one, p_two, p_one*p_two) = {1, 2, 6; 24, 120, 720} 123
4=SCAN(5, C3:E4, LAMBDA(p_one, p_two, p_one*p_two) = {5, 7, 11; 29, 124, 724} 456
5=SCAN(20, C3:E4, LAMBDA(p_one, p_two, p_one+p_two) = {22, 28, 38, 42, 50, 62} 246
6=SCAN(100, C3:E4, LAMBDA(p_one, p_two, p_one+p_two) = {102, 108, 108, 42, 50, 62} 81012

1 - We would like to return an array that contains the concatenation of all the strings.
2 - We would like to return an array that contains the concatenation of all the strings.
3 - We would like to return an array that contains the multiples of all the numbers.
4 - We would like to return an array that contains the multiples of all the numbers.
5 - We would like to return an array that contains the total of all the numbers with an initial value of 20.
6 - We would like to return an array that contains the total of all the numbers with an initial value of 20.

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top