0
0
Google Sheetsspreadsheet~10 mins

Why lookups connect datasets in Google Sheets - Formula Trace Breakdown

Choose your learning style9 modes available
Sample Data

Two datasets: one with Product IDs and Names, another with Orders referencing Product IDs. We want to connect them to show Product Names in the Orders table.

CellValue
A1Product ID
B1Product Name
A2101
B2Apple
A3102
B3Banana
A4103
B4Cherry
D1Order ID
E1Product ID
F1Quantity
G1Product Name
D25001
E2102
F25
D35002
E3101
F33
D45003
E4103
F47
Formula Trace
=VLOOKUP(E2, $A$2:$B$4, 2, FALSE)
Step 1: VLOOKUP(102, $A$2:$B$4, 2, FALSE)
Cell Reference Map
     A       B       D       E       F       G
1 |Product|Product |Order  |Product|Quantity|Product
  |  ID   |  Name  |  ID   |  ID   |        | Name  
------------------------------------------------
2 |  101  | Apple  | 5001  |  102  |   5    |       
3 |  102  | Banana | 5002  |  101  |   3    |       
4 |  103  | Cherry | 5003  |  103  |   7    |       

E2 references Product ID 102 to look up in A2:B4 range.
The formula looks up the Product ID in E2 within the Product ID and Name table in A2:B4 to find the matching Product Name.
Result
     D       E       F       G
1 |Order  |Product|Quantity|Product
  |  ID   |  ID   |        | Name  
--------------------------------
2 | 5001  |  102  |   5    | Banana
3 | 5002  |  101  |   3    | Apple 
4 | 5003  |  103  |   7    | Cherry

Column G shows Product Names fetched by lookup from Product IDs in column E.
The Product Name column in the Orders table shows the names matched by looking up Product IDs from the Products table.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the formula =VLOOKUP(E2, $A$2:$B$4, 2, FALSE) do?
AFinds the order ID for the product ID in E2
BAdds the quantity to the product ID
CFinds the product name for the product ID in E2
DCounts how many products have the ID in E2
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.