How to Fix the Excel #NAME? Error in the SCAN Function
Question details
The user needs to resolve a #NAME? error that occurs when utilizing the SCAN function in Excel.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Applying the SCAN function to process array calculations.
- Observed behavior
- The SCAN formula fails and returns a #NAME? error, typically due to an invalid LAMBDA argument or because the function is unavailable in the current Excel version.
Verify that you are using an active Microsoft 365 subscription, as the SCAN function is a dynamic array feature not supported in older standalone versions like Excel 2016 or 2019.
Format the SCAN Function with a Valid LAMBDA Argument
Use this solution to ensure your formula structure is correct, as the SCAN function strictly requires a LAMBDA function for its accumulator argument.
The SCAN function iterates over an array and applies a LAMBDA function to each value, returning an array that contains each intermediate value. If the third argument is not formatted as a valid LAMBDA function, Excel cannot parse the formula and throws a #NAME? error.
Click on the cell where you want the SCAN function results to appear.
Type your SCAN function and ensure the third argument is a LAMBDA. For example, use: =SCAN(H3,H4:H8,LAMBDA(a,b,SUM(a,b)))
Press Enter to calculate the formula. The #NAME? error should now be resolved, and the intermediate accumulated values will spill into the adjacent cells.

Update Microsoft 365 to the Latest Version
If your formula is perfectly formatted but still returns an error, your Excel client may be missing recent feature updates.
Try WPS Office for Seamless Spreadsheet Management
If your current version of Microsoft Office lacks the latest array functions or you are looking for a more cost-effective solution, consider switching to WPS Office. It provides powerful data analysis tools in a highly compatible, fast, and familiar environment.
- 1. Download the software: Visit the official WPS Office website to download the free, lightweight installation package.
- 2. Open your files: Launch WPS Spreadsheet and directly open your existing Excel documents without needing to convert file formats.
- 3. Analyze your data: Continue using standard formulas and analyzing your data with ease in a familiar layout.

Frequently Asked Questions
Why does Excel show a #NAME? error?
The #NAME? error occurs when Excel cannot recognize text inside a formula. This usually happens if a function name is misspelled, a defined name is missing, or you are trying to use a newer function (like SCAN or LAMBDA) that your current version of Excel does not support.
Is the SCAN function available in Excel 2019 or 2021?
No. The SCAN function is part of the newer dynamic array functions and is exclusive to Microsoft 365 subscriptions and Excel for the Web. Standalone versions like Excel 2016, 2019, and 2021 do not support it.
What is the role of LAMBDA in the SCAN function?
The SCAN function relies on a LAMBDA function as its third argument to act as the accumulator. The LAMBDA defines exactly how the intermediate values should be calculated (e.g., adding or multiplying them) as the SCAN function iterates through the provided array.




