Simple Tutorial: Using VLOOKUP Between Two Google Sheets Files
Hey there! If you want to pull data from one Google Sheet to another and search it, VLOOKUP combined with IMPORTRANGE is perfect. Here’s a super simple guide. We’re using these two files as examples:
- DataSheet1 (Link: https://docs.google.com/spreadsheets/d/1jckgdEP3-PQPgPnIeeEsjR_EwwY92BmdnnZQ-cYl168/edit?usp=sharing) – The main file where we’ll write the formula.
- DataSheet2 (Link: https://docs.google.com/spreadsheets/d/12FTYtqkrYMKQ3KlmHtZ3_qoDW7Ugywjg2M2zLL4u-Rs/edit?usp=sharing) – The source data file (reference).
Both files have similar data: Column A (ID), B (Name), C (Score).
Easy Steps:
-
Make Files Shareable: In each file, go to Share > Anyone with the link > Viewer. This is needed for IMPORTRANGE to work.
-
Open the Main File (DataSheet1): Add a new column, like D1: “Score from DataSheet2”.
-
Write the VLOOKUP Formula: In cell D2 (below the header), enter this:
=VLOOKUP(A2, IMPORTRANGE("https://docs.google.com/spreadsheets/d/12FTYtqkrYMKQ3KlmHtZ3_qoDW7Ugywjg2M2zLL4u-Rs", "Sheet1!A:C"), 3, FALSE)A2: The search value (ID from your file).IMPORTRANGE: Imports data from DataSheet2.3: The column for score (third column).FALSE: Exact match.
-
Authorize Access: The first time, it’ll prompt – click Allow.
-
Drag the Formula Down: To apply it to all rows.
Example:
We have the following data in our sheets:
| ID | Name | Score |
|---|---|---|
| 1 | M | 85 |
| 2 | E | 92 |
| 3 | H | 78 |
| 4 | R | 78 |
| 5 | D | 74.5 |
| 6 | A | 71 |
| 7 | D | 67.5 |
If A2 has ID=2, D2 should show 92 (the score for “E” from DataSheet2).
If A3 has ID=3, D3 should show 78 (the score for “H”).
If you see #N/A, the ID wasn’t found or the sheet is empty. Fix it with:
=IFNA(VLOOKUP(...), "Not Found")
This keeps your data synced and up-to-date. Drop a comment if you have questions!