Skip to content
ExcelExcel 2024+

SCAN function in Excel

Scans an array by applying a LAMBDA to each value and returns an array that has each intermediate value

=SCAN([initial_value], array, lambda(accumulator, value, body))

SCAN syntax and parameters

Three arguments, two required.

  • initial_valueanyOptional
  • arrayarrayRequired
  • lambda(accumulator, value, body)anyRequired

SCAN examples

Formulas you'll actually reuse.

  1. A running total down the column — every intermediate value:

    =SCAN(0, D2:D200, LAMBDA(acc, x, acc + x))
  2. The record-to-date — the biggest deal seen so far on each row:

    =SCAN(0, D2:D200, LAMBDA(acc, x, MAX(acc, x)))

SCAN in Google Sheets

Same name — your formula ports as-is.

Try SCAN in the playground

Edit the example — nothing to install.

Preloaded with the SCAN formula from Example 1 — change anything and watch it respond.

Loading the editor…