epDDB‖

SDNHZ‖SCAN

j7YhM‖Progressively applies a LAMBDA function to each element in an array and returns an array of all intermediate values.

Note Icon

mMG2J‖Enter the formula as an array formula. Hint: enter formula using keys Ctrl + Shift + Enter.


ebLBc‖Syntax

DmsLY‖=SCAN([Initial value]; Array; Formula)

eSJDx‖Initial value: Optional initial value of the accumulator.

BJ6LG‖Array: The array to be scanned.

FBYgG‖Formula: a LAMBDA function that will be called on each cell of the array.

8V4XL‖The LAMBDA function requires two variables: an accumulator (e.g., a) and the array element value (v), and must be structured as follows:

LAMBDA ( a , v , a + f ( v ) ) LAMBDA( a,v, a + f(v) )

CBqmG‖where f(v) is a function of the individual cells of the array.

GAZG2‖Examples

MiUAf‖Example

YyThq‖The following data will be used as example

 

A

B

C

1

U37rK‖Maths

EQ45W‖Physics

AEvwX‖Biology

2

47

67

33

3

36

68

42

4

40

65

44

5

39

64

60

6

 

38

43

7

47

84

62

8

29

80

51

9

27

49

40

10

57

49

12

11

56

33

60

12

57

 

 

13

26

 

 


GkZAD‖The formula =SCAN(0;A2:C2;LAMBDA(a;v;a+v)) returns the array

47

114

147


HuKUU‖which correspond to A2, A2+B2 and A2+B2+C2, respectively.

XAFa7‖Technical information

Tip Icon

wB7Kb‖This function is available since LibreOfficeDev 27.2.


Gewrf‖This function is NOT part of the Open Document Format for Office Applications (OpenDocument) Version 1.4. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.SCAN

Please support us!

Please support us!