Function Problems

How to Find the Closest Match with Multiple Criteria in Excel

Ayan MasoodAyan Masood Nov 10, 2026 869 views

Question details

The user needs to retrieve a specific value, such as a commission structure, by finding a record that exactly matches a specific rate while having the closest numerical proximity to a target production multiplier.

How to Find the Closest Match with Multiple Criteria in Excel
Product
Excel
Device & OS
not provided
Scenario
Searching a dataset to return a value based on a dual-condition criteria where one condition requires an exact text/number match and the other requires finding the minimum absolute difference to a target number.
Observed behavior
Standard lookup functions like VLOOKUP or XLOOKUP typically find exact or approximate matches for a single criterion. Combining an exact match on one column with a closest match on another requires nested dynamic array formulas.
Before you start

Ensure you are using a modern spreadsheet software that supports Dynamic Array functions such as LET, FILTER, and XLOOKUP. Verify that your lookup columns contain clean numeric data without accidental text formatting.

Solution 1Recommended

Use LET and FILTER combined with XLOOKUP

This method is highly readable and processes the data efficiently by filtering the exact match first, calculating the smallest difference, and retrieving the target result.

By utilizing the LET function, you can define variables within the formula to avoid repetitive calculations. We will first filter the data by the exact criteria, calculate the absolute difference to find the closest match, and then use XLOOKUP to return the final value.

1
Define your input cells

Set aside specific cells for your search criteria. For example, place your target rate in cell J1 and your target multiplier in cell J2.

2
Enter the nested formula

Select the cell where you want the result to appear and input the following formula: =LET(Dif,ABS(J2-FILTER($F$2:$F$12,$E$2:$E$12=J1)), MinDif,MIN(Dif), Com,FILTER($G$2:$G$12,$E$2:$E$12=J1), XLOOKUP(MinDif,Dif,Com))

3
Evaluate the result

Press Enter. The formula first filters column F by the exact rate in J1, subtracts it from your target multiplier in J2 to find the absolute difference, and then looks up the minimum difference to return the corresponding commission from column G.

Use LET and FILTER combined with XLOOKUP
Adjusting Ranges: You can easily adapt the ranges ($F$2:$F$12, $E$2:$E$12, $G$2:$G$12) to match the actual layout and row count of your worksheet.
Advanced Spreadsheet Solution

Master Dynamic Arrays with WPS Spreadsheet

WPS Spreadsheet natively supports advanced dynamic array functions like XLOOKUP, FILTER, and LET, making it incredibly easy to solve complex multi-criteria lookup problems without performance lags.

  1. 1. Download and Install: Get WPS Office for free from the official website and install the suite on your Windows, Mac, or Linux device.
  2. 2. Open your Spreadsheet: Launch WPS Spreadsheet and open your existing Excel workbook containing your data.
  3. 3. Apply the Formula: Enter your LET, FILTER, or XLOOKUP formula directly into the cell. WPS Spreadsheet will calculate the arrays instantly.
Fully compatible with Microsoft Excel formulas, functions, and .xlsx file formats.Built-in robust support for advanced dynamic array functions including XLOOKUP and FILTER.Lightweight architecture ensures fast performance even when processing massive datasets.Completely free to download and use for your daily spreadsheet analysis.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my FILTER function returning an error?

The FILTER function might return a #CALC! or #VALUE! error if no records match your exact criteria (e.g., the specific rate is not found in the column). You can add a third argument to the FILTER function, such as "Not Found", to handle empty results gracefully.

Can I use INDEX and MATCH instead of XLOOKUP for multiple criteria?

Yes, you can combine INDEX and MATCH with array calculations to achieve a similar result. However, using XLOOKUP or LET combined with FILTER is much cleaner, requires less repetitive syntax, and is generally easier to troubleshoot.

Is the LET function required to find the closest match?

The LET function is not strictly required, but it significantly improves performance and formula readability. By defining variables, you avoid calculating the absolute difference multiple times, which keeps the formula efficient.

Will these formulas work in older versions of Excel or WPS?

Functions like LET, XLOOKUP, SORT, and FILTER are dynamic array functions available in modern spreadsheet tools like Microsoft 365, Excel 2021, and updated versions of WPS Office. If you are using an older version, you may need to rely on traditional Array Formulas entered with Ctrl+Shift+Enter.