SCAN
Scans array with lambda keeping intermediates.
- Excel: Verified match
- Google Sheets: Verified match
- Returns: Array
Examples
=SCAN(0, A1:A3, LAMBDA(acc, v, acc + v)) | A | |
|---|---|
| 1 | 10 |
| 2 | 20 |
| 3 | 30 |
Result 10
Syntax
SCAN(initial_value, array, lambda) initial_value- any required
array- range required
lambda- any required
Errors
#ERROR!=SCAN(A2:A3)
Related
ARRAY_CONSTRAINTruncates a range to at most the given rows and columns. ARRAYFORMULAEvaluates an expression across a range (this engine already spills, so it is a pass-through for sheets compatibility). ARRAYTOTEXTConverts array to text representation. BYCOLApplies lambda to each column of array. BYROWApplies lambda to each row of array. CHOOSECOLSReturns the specified columns from an array.