Function Problems

How to Fix Excel Nested MAP Functions That Return #VALUE! Errors

Aamir Naveed AkramAamir Naveed Akram Nov 13, 2026 869 views

Question details

The user wants to nest one Excel MAP function inside another to produce a two-dimensional calculation result without receiving #VALUE! errors.

How to Fix Excel Nested MAP Functions That Return #VALUE! Errors
Product
Microsoft Excel
Device & OS
not provided
Scenario
A formula uses an inner MAP that should return a multi-cell array to an outer MAP, but Excel cannot pass nested arrays through MAP.
Observed behavior
Excel returns #VALUE! because MAP does not support returning nested arrays; SUM-based scalar results may look correct but do not fix the array limitation.
Before you start

Before you edit the formula, verify that your Excel version supports LAMBDA, MAP, MAKEARRAY, REDUCE, VSTACK, and BYCOL. If MAP or SCAN has started returning inconsistent results, save your workbook and restart Excel first.

Solution 1Recommended

Return a Two-Dimensional Result with MAKEARRAY Instead of Nesting MAP

Use this when the outer MAP must consume the inner MAP result; MAKEARRAY creates the 2D array directly and avoids the nested-array restriction.

MAP can transform each row or column, but it cannot return a nested array that another MAP then processes. MAKEARRAY is designed to produce a grid by calling a calculation for each row and column index.

1
Open the Name Manager or formula bar

Select the formula cell and open the formula bar, or click Formulas > Name Manager to create a reusable LAMBDA.

2
Replace the outer MAP with MAKEARRAY

Use =MAKEARRAY(row_count, column_count, LAMBDA(r,c, calculation)) where calculation uses INDEX to read the input ranges and returns a scalar for each cell.

3
Confirm every LAMBDA returns a single value

Make sure the final LAMBDA in MAKEARRAY returns one value per r,c pair, not an array, and press Enter to spill the 2D result.

Return a Two-Dimensional Result with MAKEARRAY Instead of Nesting MAP
Valid result: MAKEARRAY returns a spill range, so leave enough blank cells for the full result.
Free Microsoft Office alternative

Use WPS Spreadsheets as a Free Microsoft Excel Alternative

When Excel nested MAP errors slow you down, WPS Office offers a free, lightweight alternative that opens and saves Excel workbooks, keeps a familiar spreadsheet interface, and makes migration easy without sacrificing compatibility.

  1. 1. Download WPS Office: Go to the official WPS Office download page and click Download WPS Office Free to get the desktop installer.
  2. 2. Install and open WPS Spreadsheets: Run the installer, launch WPS Spreadsheets from the WPS Office home screen, and open your existing .xlsx workbook.
  3. 3. Review and continue editing: Check the formula cells and use WPS Spreadsheets tools or helper ranges to complete your spreadsheet work without the Excel session instability.
Free to download and use WPS Spreadsheets for workbook editing and formula tasksOpens and saves Microsoft Excel .xlsx files with high compatibilityLightweight and fast, even when you keep multiple workbooks openFamiliar ribbon UI and spreadsheet features reduce the switch from Microsoft ExcelSeamless migration for existing Excel files, including formulas, formatting, and charts
microsoft office alternative - wps office

Frequently Asked Questions

Why does nesting MAP inside MAP return #VALUE! in Excel?

Excel's MAP function cannot return a nested array to an outer MAP. Even if you wrap the inner MAP in SUM or another scalar function, the outer MAP still cannot consume a multi-cell inner array; use MAKEARRAY, REDUCE with VSTACK, or BYCOL to produce the two-dimensional result instead.

Can I use VSTACK inside BYCOL as a nested MAP workaround?

Yes. Stack the input rows with VSTACK and then process each column with BYCOL. Inside the BYCOL LAMBDA, use INDEX or LET to unpack the stacked values, so the function returns one scalar per column rather than a nested array.

Why do MAP or SCAN formulas sometimes work and then fail with #VALUE!?

This can happen when the Excel session becomes unstable. Save your workbook, close Excel completely, reopen it, and test MAP or SCAN in a blank workbook before re-entering the full formula.

Does WPS Office support Excel files with LAMBDA and dynamic arrays?

WPS Spreadsheets opens and saves .xlsx files and supports common spreadsheet features. For complex LAMBDA-based workbooks, keep the original file intact and verify formulas after opening in WPS, because dynamic array behavior may differ between spreadsheet engines.