Formula Errors

How to Fix Excel #VALUE! Error in Partial-Match FILTER Formulas

Elise WilliamsElise Williams Oct 12, 2026 872 views

Question details

The user needs to return specific column headers when a search term appears anywhere within a multi-column data range, but using a partial match in the FILTER formula is returning a #VALUE! error.

How to Fix Excel #VALUE! Error in Partial-Match FILTER Formulas
Product
Excel
Device & OS
not provided
Scenario
Searching for a partial text string (e.g., in cell A9) across a large 2D data range (C2:G100) to extract the corresponding column headers (C1:G1).
Observed behavior
Attempting to use SEARCH inside a standard FILTER function for a 2D array causes a dimension mismatch, resulting in a #VALUE! error because FILTER requires a 1D array for its include condition.
Before you start

Ensure your version of Excel or your spreadsheet software supports dynamic array functions such as FILTER, TOCOL, BYCOL, and LAMBDA, which are essential for processing complex 2D arrays.

Solution 1Recommended

Use TOCOL and BYCOL to Fix the Dimension Mismatch

This solution reduces the 2D search array into a 1D array using BYCOL, allowing the FILTER function to evaluate the columns correctly without throwing a #VALUE! error.

The #VALUE! error occurs because the FILTER function expects a one-dimensional array to match the single row of headers (C1:G1), but SEARCH returns a two-dimensional array from the data range (C2:G100).

By wrapping the search logic in BYCOL, we compress the 2D results into a 1D array of TRUE/FALSE values, which FILTER can then process perfectly.

1
Select the Output Cell

Click on cell A13 (or your preferred empty cell) where you want the matching column headers to appear.

2
Enter the Dynamic Array Formula

Type the following formula: =TOCOL(FILTER(C1:G1,BYCOL(ISNUMBER(SEARCH(A9,C2:G100))*COLUMN(C2:G100),LAMBDA(r,SUM(r)))>0,""))

3
Apply the Formula

Press Enter. The formula will automatically spill the matching column headers vertically into the cells below.

Use TOCOL and BYCOL to Fix the Dimension Mismatch
Formula Breakdown: ISNUMBER(SEARCH()) handles the partial text match, BYCOL applies the LAMBDA function to evaluate each column individually, and TOCOL ensures the final headers are displayed in a neat vertical list.
Smart Spreadsheet Management

Easily Handle Dynamic Array Formulas in WPS Office

WPS Spreadsheet fully supports modern dynamic array functions like FILTER, TOCOL, BYCOL, and LET. You can flawlessly perform complex partial-match searches across massive datasets without worrying about dimension mismatch errors.

  1. 1. Open Your Data File: Launch WPS Spreadsheet and open the workbook containing your headers and data range.
  2. 2. Select Your Output Cell: Click on the cell where you want the extracted column headers to begin spilling.
  3. 3. Enter the Array Formula: Paste the provided TOCOL and FILTER formula into the formula bar and press Enter to instantly generate the results.
100% compatibility with Microsoft Excel dynamic array formulas.Built-in error checking makes troubleshooting #VALUE! errors quick and easy.Free, lightweight, and highly responsive even with multi-column 2D data grids.Familiar interface ensures a seamless transition with zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does using SEARCH inside FILTER cause a #VALUE! error?

The FILTER function requires a one-dimensional boolean array for its include argument (to match the 1D header row). When you use SEARCH on a 2D range (like C2:G100), it returns a 2D array. Because the dimensions do not match, FILTER cannot process it, resulting in a #VALUE! error.

How does the BYCOL function fix the dimension mismatch?

BYCOL processes the 2D array column by column. By applying a LAMBDA function that evaluates each column, it reduces the 2D matrix into a 1-dimensional array of TRUE/FALSE values. This 1D array perfectly matches the header range requirement for the FILTER function.

What should I do if my partial match formula returns the wrong columns?

Because partial matches are broad (e.g., searching 'anfield' might accidentally match 'Canfield'), you can receive unexpected headers. To fix this, make your search term more specific, use exact-match conditions if applicable, or use a LET formula to extract the exact row numbers alongside the headers for manual verification.

Are these dynamic array functions available in older versions of Excel?

No, functions like FILTER, TOCOL, BYCOL, and LAMBDA are part of the modern dynamic array engine introduced in Microsoft 365 and Excel 2021. If you are using Excel 2019 or older, these formulas will return a #NAME? error. Using a modern alternative like WPS Office ensures full support for these functions.