Sub topic 14
Tiered rates and thresholds with approximate matching
Assume you know basic Excel formulas, relative and absolute references, and the difference between a lookup key and a returned value. This chapter assumes your threshold table is maintained separately from the model calculation.
Approximate matching is useful when a value belongs to a range, rather than matching one exact label. Common examples include tax bands, commission rates, borrowing spreads, and volume discounts.
How threshold matching works
A threshold table stores the lower boundary of each tier. For example:
| Minimum amount | Rate |
|---|---|
| 0 | 1.0% |
| 10,000 | 1.5% |
| 50,000 | 2.0% |
| 100,000 | 2.5% |
For an amount of 72,000, the correct rate is 2.0%. The formula must find the largest threshold that is less than or equal to the amount.
The threshold column must be sorted from smallest to largest. If it is not sorted, approximate matching can return an incorrect rate without showing an obvious error.
=XLOOKUP(B5, Tiers!$B$3:$B$7, Tiers!$C$3:$C$7, , -1)Here, B5 contains the amount. The lookup array contains the thresholds, and the return array contains the rates. The final argument, -1, tells XLOOKUP to use an exact match or, if none exists, the next smaller item.
The blank argument before -1 keeps the default not-found result. You can provide a message there if an amount below the first threshold should be reported explicitly.
=XLOOKUP(B5, Tiers!$B$3:$B$7, Tiers!$C$3:$C$7, "Below minimum", -1)The INDEX and MATCH alternative
Older Excel versions may not support XLOOKUP. Use INDEX with MATCH when compatibility matters.
=INDEX(Tiers!$C$3:$C$7, MATCH(B5, Tiers!$B$3:$B$7, 1))MATCH returns the position of the largest threshold that is less than or equal to B5. Its match type is 1, and the thresholds must be ascending. INDEX then returns the rate at that position.
For example, if B5 is 72,000, MATCH returns the position of 50,000. INDEX returns the rate in the corresponding row, 2.0%.
Boundaries and failure modes
Check the boundary behavior deliberately.
- An amount exactly equal to a threshold belongs to that threshold's tier.
- An amount between two thresholds uses the lower threshold.
- An amount below the first threshold may return
#N/AwithXLOOKUP, or an error fromMATCH. - A blank, text value, or incorrectly formatted number can produce an unexpected result.
- Duplicate thresholds make the table ambiguous. Keep each threshold unique.
- Sorting the table in descending order breaks these approximate-match patterns.
Use a check column to confirm that each threshold is greater than the previous one. You can also test amounts at zero, at every boundary, just below each boundary, and just above each boundary.
Choosing between the two formulas
Use XLOOKUP when the workbook supports it and you want clearer not-found handling. Use INDEX with MATCH when the model must work in older Excel versions or already follows that pattern consistently.
Exercise
The thresholds are 0, 10000, 50000, and 100000. What rate row should an amount of 99999 use?
Show answer
It should use the 50000 threshold, because approximate matching selects the largest threshold less than or equal to 99999.