Formula Errors

How to Fix FILTER and FIND Matching the Wrong Number in Excel

John WilsonJohn Wilson Nov 10, 2026 868 views

Question details

The user needs to prevent the FIND function within a FILTER formula from returning partial matches when searching for a specific number.

How to Fix FILTER and FIND Matching the Wrong Number in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Extracting and filtering data based on an exact numerical match using formulas.
Observed behavior
The formula returns incorrect results because FIND locates the search digit anywhere within a cell, causing unintended partial matches like finding 5 inside 95.
Before you start

Verify whether the column you are filtering contains numbers stored as text or actual numeric values, as this dictates whether you need to use quotation marks in your exact match criteria.

Solution 1Recommended

Use Exact Comparison Instead of the FIND Function

Replace the FIND function with an exact equals (=) operator in your FILTER criteria to ensure only exact matches are returned.

The FIND function is designed to locate a substring within a text string. Because of this, searching for the number 5 will naturally match 15, 50, or 95. To enforce an exact match, you should abandon FIND and use a direct logical comparison.

1
Select the target cell

Click on the cell where you want the filtered array result to begin.

2
Enter the exact match formula

Type the formula using the equals sign for comparison: =MAX(FILTER(G3:G29998, B3:B29998=5))

3
Adjust for text formats if necessary

If the numbers in your criteria column (Column B) are stored as text, wrap the number in quotation marks instead: =MAX(FILTER(G3:G29998, B3:B29998="5")). Press Enter to apply.

Use Exact Comparison Instead of the FIND Function
Accurate Results Achieved: Using the equals operator guarantees that only cells exactly matching your target number are included in the filter, completely eliminating false positives from partial matches.
Powerful Spreadsheet Tool

Use WPS Office to Manage Complex Formulas Easily

WPS Spreadsheet provides full support for advanced dynamic array functions like FILTER, making it easy to extract and analyze your data accurately without formula errors.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the document containing your dataset.
  2. 2. Select the output cell: Click the cell where you want the filtered data to appear.
  3. 3. Apply the exact match formula: Type =MAX(FILTER(G3:G29998, B3:B29998=5)) and press Enter to instantly calculate the result.
Fully compatible with Microsoft Excel formulas and .xlsx formats.Native support for dynamic array functions including FILTER, UNIQUE, and SORT.Free, lightweight, and fast alternative for heavy data analysis.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the FIND function return partial matches in Excel?

The FIND function searches for a specific string of characters within another string. It does not check if the value is an exact match for the whole cell contents. Therefore, searching for '5' will return a positive result for any cell containing the digit 5, such as '95' or '51'.

How do I filter exact text matches in Excel?

To filter exact text matches, use the equals operator with quotation marks in your FILTER criteria, such as A1:A10="apple". This prevents the partial matches that functions like SEARCH or FIND would normally include.

Can I use SEARCH instead of FIND to avoid partial matches?

No, SEARCH behaves similarly to FIND by looking for substrings, with the only difference being that SEARCH is not case-sensitive. Both will return partial matches. You must use the equals operator (=) to ensure an exact match.

What should I do if my exact match formula returns a #CALC! error?

A #CALC! error in the FILTER function usually means no records matched your exact criteria. You can add a third argument to the FILTER function to handle empty results gracefully, for example: =FILTER(G3:G29998, B3:B29998=5, "No Match").