Formula Errors

Fix #VALUE! Error with Spilled Array Named Ranges in Excel

Muhammad TalhaMuhammad Talha Nov 3, 2026 870 views

Question details

The user is encountering a #VALUE! error when combining SMALL, COUNTIF, and FILTER functions with a named range that points to a dynamic spilled array.

How to Fix #VALUE! Errors with SMALL, COUNTIF, and FILTER Arrays in Excel
Product
Excel
Device & OS
not provided
Scenario
Passing a named range containing a spilled FILTER array into COUNTIF and SMALL functions for data analysis.
Observed behavior
The formula returns a #VALUE! error when using the named range, but successfully computes when the spilled array is referenced directly in the formula.
Before you start

Before troubleshooting dynamic array formulas, verify that you are using a version of Excel that supports dynamic arrays (such as Microsoft 365 or Excel 2021) and create a backup of your workbook.

Solution 1Recommended

Reference the Spilled Array Directly Using the Spill Operator

Bypass the named range entirely and use the spill operator (#) to reference the dynamic array directly within your COUNTIF and SMALL functions.

Certain functions like COUNTIF require explicit range references to calculate properly. When a named range fails to preserve the dynamic nature of a spilled array, passing it into these functions triggers a #VALUE! error. Directly referencing the anchor cell using a spill operator (#) resolves the ambiguity for the calculation engine.

1
Locate the anchor cell

Find the specific cell where your FILTER function is entered. This is the top-left cell of your spilled array (e.g., cell A2).

2
Update the formula references

In your COUNTIF or SMALL formula, replace the text of the named range with the anchor cell reference immediately followed by the hash symbol (e.g., A2#).

3
Apply and test

Press Enter to apply the updated formula. The #VALUE! error should disappear and the correct calculation will be displayed.

Dynamic Updates: Using the spill operator ensures that as the FILTER array expands or contracts, your COUNTIF and SMALL functions will automatically adjust to the new size.
Advanced Spreadsheet Formulas

Handle Dynamic Arrays Seamlessly in WPS Spreadsheet

WPS Spreadsheet offers powerful support for modern array formulas, including FILTER, COUNTIF, and SMALL. You can easily manage spilled arrays and complex data calculations without running into frustrating #VALUE! errors.

  1. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your workbook containing the data you want to filter and analyze.
  2. 2. Create a dynamic array: Enter your FILTER formula into a cell to generate a dynamic spilled array.
  3. 3. Reference using the spill operator: Inside your COUNTIF or SMALL functions, simply type the anchor cell reference followed by '#' (e.g., C2#) to dynamically reference the entire array.
  4. 4. Use the Name Manager: Alternatively, go to the Formulas tab, open Name Manager, and define your named ranges with the spill operator for cleaner formulas.
Fully compatible with Microsoft Excel array formulas and dynamic data structuresIntuitive Name Manager for accurate and dynamic range referencingLightweight architecture ensures fast calculation even for large datasetsCompletely free to download and use for advanced spreadsheet processing
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTIF return a #VALUE! error with a spilled array named range?

COUNTIF requires a literal range reference to operate properly. If a named range does not explicitly pass a valid dynamic reference (by missing the spill operator), COUNTIF cannot evaluate the varying size of the array, resulting in a #VALUE! error.

What is the spill operator (#) in spreadsheet formulas?

The spill operator (#) is placed immediately after an anchor cell reference (e.g., B2#). It instructs the spreadsheet engine to include the entire dynamic array originating from that cell, no matter how many rows or columns it currently occupies.

Does the FILTER function automatically update named ranges?

No, standard named ranges pointing to fixed cell coordinates will not expand alongside FILTER results. You must define the named range using the anchor cell and the spill operator so it resizes dynamically with the output.