0
0
Google Sheetsspreadsheet~10 mins

INDEX and MATCH combination in Google Sheets - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This table lists names in column A and their scores in column B. Cell D2 contains a name to look up, and we want to find the corresponding score using INDEX and MATCH.

CellValue
A1Name
B1Score
A2Alice
B285
A3Bob
B392
A4Charlie
B478
A5Diana
B590
D1Lookup Name
D2Bob
E1Score Found
Formula Trace
=INDEX(B2:B5, MATCH(D2, A2:A5, 0))
Step 1: MATCH(D2, A2:A5, 0)
Step 2: INDEX(B2:B5, 2)
Step 3: =INDEX(B2:B5, MATCH(D2, A2:A5, 0))
Cell Reference Map
    A       B       C       D       E
1 | Name  | Score |       | Lookup | Score
  |       |       |       | Name   | Found
2 | Alice | 85    |       | Bob    | 
3 | Bob   | 92    |       |        | 
4 | Charlie| 78   |       |        | 
5 | Diana | 90    |       |        | 

Arrows:
D2 --> MATCH lookup in A2:A5
MATCH result --> INDEX row number in B2:B5
The formula uses D2 as the lookup value to find its position in A2:A5 with MATCH. The position number is then used by INDEX to get the corresponding score from B2:B5.
Result
    A       B       C       D       E
1 | Name  | Score |       | Lookup | Score
  |       |       |       | Name   | Found
2 | Alice | 85    |       | Bob    | 92
3 | Bob   | 92    |       |        | 
4 | Charlie| 78   |       |        | 
5 | Diana | 90    |       |        | 
The formula in E2 shows 92, which is the score for 'Bob' found by the INDEX and MATCH combination.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the MATCH function return in this formula?
AThe position of 'Bob' in A2:A5
BThe score of 'Bob'
CThe value in D2
DThe range B2:B5
Key Result
INDEX(range_to_return_value_from, MATCH(lookup_value, lookup_range, 0)) finds the position of lookup_value and returns corresponding value from another range.