logo
search
Excel Error Codes

How to Fix the Excel #NAME? Error in the SCAN Function

Muhammad TalhaMuhammad Talha Oct 1, 2026 868 views

Question details

The user needs to resolve a #NAME? error that occurs when utilizing the SCAN function in Excel.

How to Fix the Excel #NAME? Error with the SCAN Function
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target cell

Click on the cell where you want the SCAN function results to appear.

2
Enter the formula correctly

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)))

3
Execute the function

Press Enter to calculate the formula. The #NAME? error should now be resolved, and the intermediate accumulated values will spill into the adjacent cells.

Format the SCAN Function with a Valid LAMBDA Argument
Understanding LAMBDA Parameters: In the formula LAMBDA(a,b,SUM(a,b)), 'a' represents the accumulated total and 'b' represents the current value from your array.
Free Microsoft Office alternative

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. 1. Download the software: Visit the official WPS Office website to download the free, lightweight installation package.
  2. 2. Open your files: Launch WPS Spreadsheet and directly open your existing Excel documents without needing to convert file formats.
  3. 3. Analyze your data: Continue using standard formulas and analyzing your data with ease in a familiar layout.
Seamless format compatibility with Microsoft Excel (.xlsx and .xls) files.Free to download and use, offering a lightweight alternative to heavy Office suites.Familiar user interface requiring zero learning curve for Excel users.Rich set of built-in formulas, pivot tables, and charting tools for advanced data analysis.
microsoft office alternative - wps office

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.