Contact

SCAN Function in Google Sheets: Syntax, Examples & Compatibility

Array Intermediate Google Sheets

Learn how to return each intermediate accumulated result instead of only the final total in Google Sheets. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Google Sheets. How formula examples are checked

Quick answer: return each intermediate accumulated result instead of only the final total in Google Sheets. The reproducible examples below use explicit values so the formula’s meaning is testable without a large workbook.

Evidence: The function name and syntax are documented in the linked vendor function reference. Expected outputs were independently reasoned or checked outside the application. These are not native Google Sheets test results. A guide being published here does not certify every software release or file-import scenario.

Syntax and arguments

=SCAN(initial_value, array_or_range, LAMBDA)

Like REDUCE, SCAN passes the accumulator and current element to its LAMBDA, but produces a result for each input.

Best use case: Return each intermediate accumulated result instead of only the final total.

Set up the example sheet

Create a simple monthly-count column A2:A4 = 1, 2, 3. Keep the three-cell output area empty.

Enter the formula in an unused cell. For a formula returning several values, leave an unobstructed area where those values can expand. These formulas use comma argument separators in a typical English-language locale; commas or semicolons inside quoted text are data, not argument separators. Adapt the separator if your regional settings require it.

Worked example 1: SCAN with known input

=SCAN(0,A2:A4,LAMBDA(total,x,total+x))

Expected output: vertical running totals 1, 3, 6.

Each source item is added to the carried total; all intermediate totals are returned.

Worked example 2: a second SCAN case

=SCAN(1,A2:A4,LAMBDA(product,x,product*x))

Expected output: vertical products 1, 2, 6.

The running product follows 1, 1×2, then 1×2×3.

Compare both results before replacing literal values or short sample ranges with your own workbook data. For a spilling formula, compare every output cell, not only the top-left result.

Practical advice and troubleshooting

When this formula helps: SCAN is useful for cumulative metrics such as running inventory balances without manual fill-down.

Important edge case: The output expands to multiple cells. Distinguish it from REDUCE, which returns only the final accumulator.

If the result differs, first verify the text-versus-number types of the input cells, the argument separators for your locale, and the range size. For dynamic arrays, inspect occupied cells in the output area. An error that looks like a missing function may reflect a software version rather than incorrect data.

Compatibility and version considerations

If moving a SCAN formula, check whether the target application supports this lambda helper and the same accumulation order.

Check your installed release for availability and dynamic-array support.

Function availability and parameter behavior must be judged for the specific application and release; a function documented in one spreadsheet does not automatically work in another.

Editorial verification: Vendor catalogue referenced as of 2026-10-12. The two example outputs are independently reasoned; no native application run, screenshot, or version-specific output is claimed. Review the editorial testing standards if you require stronger proof before importing a workbook.