0
0
Excelspreadsheet~10 mins

Merging queries (joins) in Excel - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Two tables: Left table with IDs and Names (A1:B4), Right table with IDs and Scores (D1:E4). We want to merge them by ID.

CellValue
A1ID
B1Name
A21
B2Alice
A32
B3Bob
A43
B4Charlie
D1ID
E1Score
D22
E285
D33
E390
D44
E475
Formula Trace
=IFERROR(VLOOKUP(A2, $D$2:$E$4, 2, FALSE), "No Score")
Step 1: VLOOKUP(1, $D$2:$E$4, 2, FALSE)
Step 2: IFERROR(#N/A, "No Score")
Cell Reference Map
    A       B       C       D       E
1 | ID    | Name  |       | ID    | Score
2 | 1     | Alice |       | 2     | 85
3 | 2     | Bob   |       | 3     | 90
4 | 3     | Charlie|      | 4     | 75

Arrows: A2 -> VLOOKUP lookup value
Range $D$2:$E$4 -> VLOOKUP table array
Column 2 -> VLOOKUP returns Score
Formula in cell C2 uses A2 as lookup value and searches in D2:E4 for matching ID to get Score.
Result
    A       B       C
1 | ID    | Name  | Score
2 | 1     | Alice | No Score
3 | 2     | Bob   | 85
4 | 3     | Charlie| 90
Column C shows Scores matched by ID from right table. If no match, shows 'No Score'.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the formula return for ID 1?
ANo Score
B85
C90
D75
Key Result
VLOOKUP looks for a value in the first column of a range and returns a value from a specified column in the same row.