Two-Way Lookup
Premiumintermediate 15 min4 tasks0/66 pts
A two-way lookup finds the value where a row and a column cross, like East sales in March. Use one MATCH for the row and one for the column inside INDEX, or nest one XLOOKUP inside another. The inner lookup picks the column, and the outer one picks the row.
Syntax
INDEX(data, MATCH(row_value, row_labels, 0), MATCH(col_value, col_labels, 0)) ยท XLOOKUP(row_value, row_labels, XLOOKUP(col_value, col_labels, data))
Example: =INDEX(B2:E5,MATCH("East",A2:A5,0),MATCH("Mar",B1:E1,0)) returns 210, the value where the East row meets the Mar column.
Common mistakes
- Giving INDEX the whole table including headers, so every position is off by one.
- Swapping the row and column MATCH inside INDEX.
- Leaving out the 0 in MATCH, which allows an approximate match.
Youโll also use
The practice tasks combine this lesson with:
SUM
SUM(number1, [number2], โฆ)Adds all the numbers in a range.
Read the lesson, then try it yourself in a live spreadsheet.