INDEX and MATCH with approximate match is a lookup technique in Excel and Google Sheets that finds the closest match in a sorted list, not just an exact one. You enter a lookup value, a table, and a column index, and the formula returns the value from the row where the lookup value is the largest value that is less than or equal to your search value. This is the same behavior as VLOOKUP with its range_lookup argument set to TRUE, but INDEX/MATCH gives you more flexibility with column positions and left-side lookups.
Why Use INDEX/MATCH Instead of VLOOKUP?
VLOOKUP with approximate match is simpler to write, but it has two major limitations: the lookup column must be the first column of the table, and the return column must be to the right of it. INDEX/MATCH removes both restrictions. You can look up values in any column and return values from any other column, regardless of position. This is especially useful when you add or remove columns from your data – VLOOKUP formulas often break, while INDEX/MATCH formulas remain correct as long as you update the column index.
Another advantage: INDEX/MATCH is generally faster on large datasets because it only looks at the lookup column, not the entire table. In practice, the difference is negligible for small tables, but for tens of thousands of rows, it can be noticeable.
When Approximate Match Is the Right Choice
Approximate match is designed for continuous, sorted data where you want to find a value that falls within an interval. Common use cases include:
- Tax brackets – find the tax rate for a given income.
- Shipping costs – find the cost based on weight tiers.
- Grade boundaries – find the letter grade for a numeric score.
- Discount thresholds – find the discount percentage for a purchase amount.
- Time-based pricing – find the rate for a given duration.
In all these cases, the lookup table must be sorted in ascending order by the lookup column. If the table is not sorted, approximate match can return incorrect results because it stops at the first value that is less than or equal to the lookup value, not the largest such value.
How to Set Up a Lookup Table for Approximate Match
- Put the lookup values in a column, sorted from smallest to largest (e.g., 0, 1000, 5000, 10000).
- Put the corresponding return values in the adjacent column (e.g., 0%, 5%, 10%, 15%).
- Write the formula:
=INDEX(return_column, MATCH(lookup_value, lookup_column, 1)).
For example, to find a discount for a $7,500 purchase with tiers at 0, 1000, 5000, and 10000, MATCH would return 3 (the position of 5000, since 7500 is between 5000 and 10000), and INDEX would return 10%.
Common Mistakes and How to Avoid Them
- Unsorted lookup column – Always sort ascending. Otherwise, results are unpredictable.
- Using 0 instead of 1 – A match_type of 0 forces exact match, which will return #N/A if there is no exact value.
- Mixing data types – If the lookup column contains text numbers and the lookup value is a real number, MATCH may fail. Ensure both are the same type.
- Wrong column index – INDEX returns from the return_range you specify, but if you accidentally use the wrong column, you get the wrong data.
- Forgetting that approximate match returns the largest value ≤ lookup – This is not a nearest match; it is always the lower bound. If you need the closest value, you need a different approach.
Alternatives to INDEX/MATCH Approximate
If you need the closest value (not just the lower bound), you can use an array formula with MIN(ABS(lookup_range – lookup_value)) to find the nearest, but that is more complex. For simple interval lookups, VLOOKUP with TRUE works, but INDEX/MATCH is more flexible. XLOOKUP (available in newer Excel and Google Sheets) also supports approximate match with a match_mode argument, and it is even simpler to write: =XLOOKUP(lookup_value, lookup_range, return_range, , -1) for exact or next smaller. However, XLOOKUP may not be available in older versions of Excel, so INDEX/MATCH remains a safe, widely compatible choice.
Frequently Asked Questions
Does approximate match require sorting?
Yes, for both MATCH with match_type 1 and VLOOKUP with TRUE, the lookup column must be sorted in ascending order. If it is not, the formula may return a wrong result or #N/A. Sorting is the first thing to check when results seem off.
Can I use approximate match with text?
Approximate match works with numbers and dates, but with text it is not meaningful because text does not have a natural numeric order. For text, use exact match (0) or a wildcard match if needed.
What does #N/A mean?
#N/A usually means the lookup value is smaller than the smallest value in the lookup column. For example, if your lookup column starts at 1000 and you search for 500, there is no value ≤ 500, so MATCH returns #N/A. It can also mean the data types are mismatched.
How do I get the closest match instead of the lower bound?
To get the closest value, you need a different formula, such as an array formula using INDEX and MATCH with MIN(ABS(…)). For example: =INDEX(return_range, MATCH(MIN(ABS(lookup_range - lookup_value)), ABS(lookup_range - lookup_value), 0)). This finds the smallest absolute difference. Note that this requires entering as an array formula in older Excel (Ctrl+Shift+Enter).
Is INDEX/MATCH faster than VLOOKUP?
In most cases, yes, because INDEX/MATCH only processes the lookup column and the return column, while VLOOKUP processes the entire table array. For large datasets, the difference can be significant, but for typical small tables, both are instantaneous.
Can I use approximate match with multiple criteria?
Yes, but it becomes more complex. You can combine MATCH with multiple conditions using array formulas or helper columns. A common approach is to concatenate the criteria into a single lookup column, but that requires exact match. For approximate match with multiple criteria, you would need to sort by the primary criterion and use a more advanced formula.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Compressed Zipped Folder Access Denied? Fix It
- IPTV TV Boxes: How to Choose the Right Streaming Device
- Custom Races in Assetto Corsa: Server Setup Guide
- Dueling Grounds Events Schedule: Full Guide
- Nokia E71 Auto Lock: Step-by-Step Setup
- Evaluating Co-Packaged Optics Switches for AI Data Centers