Sub topic 7
What an Exact-Match Lookup Does
Prerequisites
This chapter assumes that you can enter Excel formulas, use relative and absolute references, and read a simple financial model. You should also understand that a key is a value used to identify one record, such as an account code or assumption name.
An exact-match lookup finds one record whose key is exactly equal to a search value. It then returns a related value from that record. For example, a model can find the assumption named “Tax rate” and return 25%.
Exact matching is different from aggregation. Aggregation adds values from many rows. A lookup retrieves a value from one matching row. If a key appears twice, the formula may return only the first match, so unique keys are important.
The lookup model
Suppose the Assumptions sheet contains this table:
| Key | Value |
|---|---|
| Tax rate | 25% |
| Revenue growth | 8% |
| Exit multiple | 12.0 |
The key is in column B and the value is in column C. Cell A5 on the model sheet contains the key to find.
An exact-match lookup follows this path:
XLOOKUP for an exact match
XLOOKUP is the clearest choice in current Excel versions. Its main arguments are the value to find, the lookup array, the return array, and an optional result for a missing key.
=XLOOKUP($A5,Assumptions!$B$3:$B$12,Assumptions!$C$3:$C$12,"Missing assumption")By default, XLOOKUP uses exact matching. The dollar signs anchor the ranges when the formula is copied. The reference to A5 locks the column but allows the row to change.
If A5 contains Tax rate, the formula returns 25%. If the key does not exist, it returns Missing assumption instead of a cryptic error. A visible missing-key result helps a reviewer find an incomplete model.
A lookup array and a return array must align. The first item in the lookup array corresponds to the first item in the return array, the second corresponds to the second, and so on.
Exact matching with INDEX and MATCH
INDEX with MATCH performs the same task in two steps. MATCH finds the position of the key. INDEX returns the value at that position.
=INDEX(Assumptions!$C$3:$C$12,MATCH($A5,Assumptions!$B$3:$B$12,0))The zero tells MATCH to require an exact match. Without zero, MATCH can use approximate behavior and may return an incorrect result when the list is not sorted as required.
INDEX with MATCH remains useful when working with older Excel versions or when a model already uses that pattern. It also separates the position-finding step from the value-returning step, which can help when debugging.
Common errors
- Searching the value column instead of the key column.
- Using ranges with different numbers of rows.
- Omitting the exact-match argument in MATCH.
- Allowing duplicate keys in the assumptions list.
- Hiding missing keys with IFERROR instead of investigating them.
- Using text that differs because of extra spaces or inconsistent spelling.
Practice
Exercise
Cell A5 contains "Revenue growth". Write an XLOOKUP formula that searches Assumptions!B3:B12, returns Assumptions!C3:C12, and displays "Missing assumption" when no exact key exists.
Show answer
=XLOOKUP($A5,Assumptions!$B$3:$B$12,Assumptions!$C$3:$C$12,"Missing assumption")