=SCAN(initial_value, array, LAMBDA(accumulator, current, calculation))One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
Need more than a single SCAN formula? Try our free AI for Excel — it reads your entire spreadsheet, answers questions in plain English, and builds charts and analysis in the same chat.
initial_value:
The starting value for the accumulation process. This value is used as the first argument in the LAMBDA function during the calculation.
array:
The range or array of values that you want to process through the LAMBDA function. This is the set of data that will be iterated over.
LAMBDA:
A function that defines the calculation to be performed on each element of the array. It takes at least two parameters: accumulator (the accumulated value from previous iterations) and current (the current element from the array being processed).
The SCAN function in Excel is a powerful tool that allows you to perform a cumulative operation across a range of values. It evaluates each element in the specified array and applies a given function, returning an array of results that represent the cumulative value at each position.
In simpler terms, the SCAN function helps you calculate running totals or cumulative results, making it easier to analyze trends over time.
Imagine you are tracking the daily sales for a small business, and you have the following data in an Excel spreadsheet:
| Day | Sales Amount |
|---|---|
| 1 | 200 |
| 2 | 150 |
| 3 | 300 |
| 4 | 250 |
| 5 | 100 |
You want to find the cumulative sales amount for each day.
To calculate the cumulative sales for each day, you would use the SCAN formula as follows:
=SCAN(0, B2:B6, LAMBDA(total, current, total + current))When you apply the formula, it calculates the cumulative sales amounts for each day. The output would be:
| Day | Cumulative Sales |
|---|---|
| 1 | 200 |
| 2 | 350 |
| 3 | 650 |
| 4 | 900 |
| 5 | 1000 |
Here, the cumulative sales amount is calculated as follows:
The SCAN function is particularly useful when you need to analyze data trends over time without manually calculating cumulative totals. It allows you to quickly derive insights into how values accumulate, making it easier to understand performance over a period.
Understanding how to use the SCAN function can significantly enhance your data analysis capabilities in Excel, enabling you to extract meaningful insights from your datasets.
Happy calculating!
You have a table where Column A contains daily expenses and Column B contains the corresponding dates. You can use the SCAN function to create a running total of expenses over the month. This allows for easy tracking of cumulative spending, helping you to monitor your budget and make informed financial decisions without the need for manual calculations or complex formulas.
Beyond the SCAN function: Better Analyst is a full Excel AI that goes well past individual formulas. Upload any spreadsheet and ask questions in plain English — you'll get formulas, data analysis, and charts back in seconds. It's a free AI Excel assistant that works with any .xlsx, .xls, or .csv file — no plugins, no Microsoft 365 required.
Don't have a spreadsheet yet? Use our free AI spreadsheet generator to turn a text prompt into a downloadable Excel file — a full AI Excel sheet maker that builds headers, columns, and formulas from your description.
Create a free account for formula help, explanations, and spreadsheet analysis. Usage limits depend on your plan.
Browse our complete library of Excel formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.