Numbers Exercises

SCAN in Apple Numbers

Last updated:

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.

Table 1
ABC
1ProductPriceQty
2Apple410
3Pear65
4Kiwi122
5Grape83

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