Sub topic 10
MATCH: finding a key's position
Assume you know basic Excel navigation, formulas, relative and absolute references, and simple financial statement layouts. This chapter focuses on MATCH, which finds where a value appears in a range. It does not return the value itself. It returns the value's position.
Why position matters
A financial model often stores assumptions in a list:
| Key | Value |
|---|---|
| Tax rate | 0.25 |
| Revenue growth | 0.08 |
| Debt interest rate | 0.06 |
If A5 contains Revenue growth, this formula finds its position in the key range:
=MATCH($A5, Assumptions!$B$3:$B$12, 0)The final argument, 0, requests an exact match. If Revenue growth is the second item in B3:B12, the formula returns 2.
The result is relative to the supplied range. It is not necessarily the worksheet row number. If the range begins at row 3, position 2 means worksheet row 4.
How MATCH works
The syntax is:
=MATCH(lookup_value, lookup_array, match_type)| Argument | Meaning |
|---|---|
| `lookup_value` | The key or value to find |
| `lookup_array` | The one-row or one-column range to search |
| `match_type` | The matching rule |
For financial model keys, use exact matching:
=MATCH($A5, Assumptions!$B$3:$B$12, 0)The formula searches the assumptions list for the value in A5. The dollar signs keep the lookup cell and source range fixed when you copy the formula.
MATCH returns an error when no exact key exists. This is useful because a missing assumption should not silently produce an incorrect result.
=IFNA(MATCH($A5, Assumptions!$B$3:$B$12, 0), "Missing key")Use IFNA when you want a readable message. During model development, leaving the error visible can make the problem easier to investigate.
MATCH with INDEX
MATCH is often paired with INDEX. MATCH finds the position, and INDEX returns the value at that position.
=INDEX(Assumptions!$C$3:$C$12, MATCH($A5, Assumptions!$B$3:$B$12, 0))If A5 contains Revenue growth, MATCH finds its position in column B. INDEX uses that position to return the corresponding value from column C.
This approach separates the search range from the return range. The key column does not need to be to the left of the value column, and the formula does not depend on a fixed column number.
Common errors
- Omitting
0can select an unintended match mode. - Duplicate keys return the first match, so keys should be unique.
- The lookup and return ranges must align. A position found in ten keys must be applied to a return range with the same ten corresponding rows.
- Extra spaces or different spelling can prevent an exact match.
- A horizontal range returns a horizontal position; a vertical range returns a vertical position.
Exercise
What does =MATCH("Tax rate", Assumptions!$B$3:$B$12, 0) return, and what does it not return?
Show answer
It returns the relative position of "Tax rate" in the key range. It does not return the tax rate value itself.