SCAN in Apple Numbers
Short answer: SCAN works like REDUCE, but returns every intermediate result instead of only the final one. Syntax:
SCAN(initial-value, array, LAMBDA(accumulator, value, calculation))Explanation
SCAN works like REDUCE, but returns every intermediate result instead of only the final one. Ideal for running totals.
Syntax
SCAN(initial-value, array, LAMBDA(accumulator, value, calculation))Example
Use SCAN to make a running total of the prices (B2:B5) and return the fourth value.
| A | B | C | |
|---|---|---|---|
| 1 | Product | Price | Qty |
| 2 | Apple | 4 | 10 |
| 3 | Pear | 6 | 5 |
| 4 | Kiwi | 12 | 2 |
| 5 | Grape | 8 | 3 |
Formula: =INDEX(SCAN(0,B2:B5,LAMBDA(acc,v,acc+v)),4)
Result: 30
Frequently asked questions
What does SCAN do in Apple Numbers?
SCAN works like REDUCE, but returns every intermediate result instead of only the final one. Ideal for running totals.
What is the syntax of SCAN?
The syntax is SCAN(initial-value, array, LAMBDA(accumulator, value, calculation)).
More in this category
Read more
Practise it yourself
Type the formula yourself in a real exercise and see right away if your answer is correct. The first exercises are free.
Start practising