How to look up the closest match (tax brackets, tiers, grades)
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Find which bracket or tier a value falls into — the largest threshold that doesn't exceed it.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =INDEX(B2:B5,MATCH(D2,A2:A5,1)) | Thresholds in A2:A5 must be sorted ascending. XLOOKUP(D2,A2:A5,B2:B5,,-1) needs no sorting logic change. |
| Google Sheets | =INDEX(B2:B5,MATCH(D2,A2:A5,1)) | Identical; VLOOKUP(D2,A2:B5,2,TRUE) is the classic equivalent. |
| LibreOffice Calc | =INDEX(B2:B5,MATCH(D2,A2:A5,1)) | Identical. |
How it works
MATCH with type 1 finds the LAST threshold ≤ the value in an ascending list — 120 clears the 100 tier but not 200, so the answer is "Gold". This is exactly how tax brackets, commission tiers, shipping bands, and letter grades work, and it's why the thresholds list the BOTTOM of each band. The classic VLOOKUP-with-TRUE does the same; unsorted data silently returns wrong answers, which XLOOKUP's -1 match mode avoids.
Verified, not just documented
We ran =INDEX(B2:B5,MATCH(D2,A2:A5,1)) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned Gold — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned Gold for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
INDEX · MATCH — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to do a case-sensitive lookup
- How to find the most common text value (mode for text)
- How to find the label that goes with the highest value
- How to use INDEX/MATCH
- How to look up a value by both row and column (two-way lookup)