Function Problems

Excel: Return the Next Higher Value with an Exact Match

Emma BrownEmma Brown Dec 2, 2026 869 views

Question details

Find a result using a numeric threshold and an exact match for a second criterion.

Return the Next Higher Value with an Exact Match in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to return a value from a table where the first column is at least the input number and another column exactly matches a second input.
Observed behavior
The desired result is the row with the smallest qualifying number and an exact match for the second criterion.
Before you start

Identify the numeric lookup column, the exact-match column, and the return column. Sort the entire table by the numeric lookup column in ascending order so the first qualifying row has the smallest available number.

Solution 1Recommended

Use INDEX and MATCH with Two Criteria

Return the result for the smallest number that is at least the input value and matches the second criterion.

The formula finds the first row where column A is greater than or equal to the number in F7 and column C matches G7. Sorting the full table by column A ensures that the first qualifying row is the next available value.

1
Sort the table

Select the full table, including columns A through D, and use Data > Sort to sort column A from smallest to largest. Keep each row together when sorting.

2
Enter the lookup inputs

Enter the numeric threshold in F7 and the value to match exactly in G7. Adjust the cell references if your inputs are elsewhere.

3
Enter the formula

Select the result cell and enter =IFERROR(INDEX($D$3:$D$21,MATCH(1,($A$3:$A$21>=F7)*($C$3:$C$21=G7),0)),""). Change the ranges to match your table, keeping them the same size.

4
Confirm the formula

Press Enter in Microsoft 365. In older Excel versions, confirm the formula with Ctrl+Shift+Enter.

Use INDEX and MATCH with Two Criteria
Multiple matches and errors: If several rows have the same qualifying number and exact-match value, the formula returns the first one. IFERROR displays a blank when no match is found or another formula error occurs.
WPS Spreadsheet

Build the Same Two-Criteria Lookup in WPS Spreadsheet

Use INDEX and MATCH in WPS Spreadsheet to return the next qualifying number's result while matching a second criterion.

  1. 1. Open the spreadsheet: Open WPS Spreadsheet and use File > Open to select your workbook.
  2. 2. Sort the lookup table: Select the entire table and use Data > Sort to arrange the numeric lookup column from smallest to largest.
  3. 3. Enter the inputs: Enter the threshold in F7 and the exact-match value in G7, or choose equivalent input cells in your sheet.
  4. 4. Enter the lookup formula: Select a result cell and enter =IFERROR(INDEX($D$3:$D$21,MATCH(1,($A$3:$A$21>=F7)*($C$3:$C$21=G7),0)),""). Adjust the ranges and input references to fit your table.
  5. 5. Confirm and check the result: Press Enter and check the result against the sorted table. If your WPS version requires array formula entry, select the formula cell and confirm it with Ctrl+Shift+Enter.
Combine a numeric threshold with an exact-match criterionOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and sorting toolsWork with spreadsheets using the free version of WPS Office
microsoft office alternative - wps office

Frequently Asked Questions

Does the formula include an exact match for the number?

Yes. The condition A3:A21>=F7 includes a number equal to F7 as well as larger numbers. Use > instead of >= if the number must be strictly higher.

Why do I need to sort the table?

MATCH returns the first qualifying row, not automatically the smallest qualifying number. Select the entire table and sort the numeric lookup column in ascending order to keep the rows together.

What happens if no row meets both criteria?

IFERROR returns an empty string, so the result cell appears blank. Remove IFERROR temporarily if you want to see the underlying error.

What if more than one row meets both criteria?

The formula returns the value from the first qualifying row in the sorted table. Add another criterion if you need to distinguish between duplicate matches.