Sub topic 3
INDEX with MATCH as a lookup
This chapter assumes you can enter formulas, use relative and absolute references, and work with a flat table where each row has a unique key in one column. INDEX returns the value at a given position in a range. MATCH returns the position of a key in a range. Together they retrieve one value by key, and they work in every version of Excel.
INDEX with MATCH as a lookup
MATCH with 0 as its third argument finds the exact position of a key. INDEX uses that position to return the value from a second column.
=INDEX(Assumptions!$C$3:$C$12, MATCH($A5, Assumptions!$B$3:$B$12, 0))The key range and the return range must be the same height and must line up row for row. If they do not, the formula returns a value from the wrong row without any error.
Looking up by row and column together
Pass a row position and a column position to INDEX. Each MATCH finds one of them.
=INDEX(Rates!$C$3:$H$12, MATCH($A5, Rates!$B$3:$B$12, 0), MATCH(C$4, Rates!$C$2:$H$2, 0))Here the row labels sit in column B, the column headers sit in row 2, and the formula returns the rate where the two cross.
Tiered rates and thresholds with approximate matching
For tiered rates, use MATCH with 1. It finds the largest threshold that does not exceed the value. The thresholds must be sorted in ascending order, and the first threshold should be 0.
=INDEX(Tiers!$C$3:$C$7, MATCH(B5, Tiers!$B$3:$B$7, 1))Catching duplicates, missing keys, and unreconciled totals
A duplicated key makes MATCH return only the first matching row. A missing key makes it return #N/A. Place a count check beside each lookup key.
=COUNTIF(Assumptions!$B$3:$B$12, $A5)A result of 1 means the key is unique. A result of 0 means the key is missing. Reconcile totals as well:
=ROUND(SUM(C10:N10) - SUM(Data!$F$2:$F$5000), 2)A zero result means the monthly roll-up captured every ledger row.
Choosing between SUMIFS, XLOOKUP, and INDEX with MATCH
Use this flow to pick a function.
SUMIFS totals ledger rows by criteria. XLOOKUP is the clearest single-value lookup and has a built-in not-found argument, but it needs Excel 2021 or Microsoft 365. INDEX with MATCH works in every version and handles two-way and approximate lookups with a clear structure. Record your choice in the model notes so reviewers can audit it.
Exercise
Thresholds 0, 10000, and 50000 sit in B3:B5, and the matching rates sit in C3:C5. Which formula returns the rate for the amount in B9?
Show answer
=INDEX($C$3:$C$5, MATCH(B9, $B$3:$B$5, 1))