Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

VLOOKUP From Another Google Sheets Workbook

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can pull a value from a different Google Sheets file with VLOOKUP by using the IMPORTRANGE function as the range argument. The formula pattern is =VLOOKUP(A2, IMPORTRANGE("spreadsheet_url", "Sheet1!A:C"), 3, FALSE). The first time you use it, Google Sheets asks you to authorize access to the source file. After that, the lookup works like any other VLOOKUP, matching a key in your current sheet against the first column of the imported range and returning a value from a column you specify. This is useful for keeping a master price list, employee roster, or inventory table in one workbook and looking values up from many other workbooks without copy-pasting.

What You'll Need

  • Edit access to both the source workbook (the one holding the data) and the destination workbook (the one where you type the formula). View-only access to the source is not enough to authorize IMPORTRANGE.
  • The full URL of the source spreadsheet, copied from the browser address bar. It looks like https://docs.google.com/spreadsheets/d/abc123.../edit.
  • The exact name of the tab (sheet) in the source file that contains the data, including spaces and capitalization.
  • A key column in both files that matches exactly, such as an employee ID, SKU, or email address. The key must be in the first column of the imported range for VLOOKUP to work.

Step-by-Step

  1. Open the destination workbook where you want the looked-up value to appear. Click the cell that will hold the formula, for example B2 next to a list of product codes in column A.
  2. Copy the source URL. Switch to the source workbook, click the address bar, and copy the entire URL up to but not including the #gid= part. Alternatively, use the Share button and copy the link, but make sure the link is set so you can open it.
  3. Write the IMPORTRANGE wrapper. In the destination cell, type =IMPORTRANGE("PASTE_URL_HERE", "Sheet1!A:C"). Replace PASTE_URL_HERE with the copied URL and Sheet1 with the real tab name. A:C means columns A through C will be imported. Press Enter.
  4. Authorize the connection. The cell will show #REF! with a message about needing access. Hover over the cell and click Allow access in the popup, or click the cell and follow the prompt. A dialog asks you to connect the two sheets; click Allow. This is a one-time step per source file.
  5. Confirm the import works. The cell should now show a spilled array of data from the source sheet. If it shows #REF! again, the URL or sheet name is wrong, or you do not have edit access to the source.
  6. Wrap it in VLOOKUP. Replace the standalone IMPORTRANGE with the full formula: =VLOOKUP(A2, IMPORTRANGE("PASTE_URL_HERE", "Sheet1!A:C"), 3, FALSE). Here A2 is the key you are searching for, 3 means return the value from the third column of the imported range (column C), and FALSE means require an exact match.
  7. Copy the formula down. Drag the fill handle down column B to apply the lookup to every row. Each row uses its own key from column A.
  8. Check a few results by eye. Pick two or three keys and confirm the returned values match what you see in the source workbook. If they do not, the column index number is probably wrong.
  9. Optionally, import once and reference locally. If you need many lookups, put a single IMPORTRANGE in a helper sheet, for example on a tab called Import, in cell A1. Then use =VLOOKUP(A2, Import!A:C, 3, FALSE) in your main sheet. This is faster and easier to audit than repeating IMPORTRANGE in every formula.

Common Mistakes

  • Wrong column index. The number in VLOOKUP counts columns inside the imported range, not columns in the source sheet. If your range is B:D and you want column D, the index is 3, not 4.
  • Key not in the first imported column. VLOOKUP only searches the leftmost column of the range you give it. If your key is in column C, start the range at C.
  • Using TRUE instead of FALSE. The fourth argument must be FALSE for an exact match. TRUE returns approximate matches and produces wrong values on unsorted data.
  • Forgetting to authorize. The first formula in a new destination file always needs the Allow access click. Without it, every IMPORTRANGE returns #REF!.
  • Sheet name typos. The tab name in quotes must match exactly, including spaces. If the tab is called Master List, write "Master List!A:C", not "MasterList!A:C".
  • Mismatched key formats. A number stored as text in one sheet and as a number in the other will not match. Use TRIM or convert the column to a consistent format.

Tips

  • Use a named helper tab for the import so the long URL appears once, not in dozens of formulas.
  • Keep the source workbook's key column free of duplicates. VLOOKUP returns the first match only.
  • If the source data changes often, expect a short delay before the destination updates. IMPORTRANGE is not instant.
  • Use IFERROR(VLOOKUP(...), "Not found") to replace ugly #N/A errors with a readable label.
  • For lookups to the left of the key, use INDEX and MATCH instead of VLOOKUP, since VLOOKUP cannot search leftward.

Troubleshooting

If the formula returns #REF!, first check that you clicked Allow access and that you have edit rights to the source file. Next, verify the URL is complete and does not include extra characters after the spreadsheet ID. If the sheet name is wrong, the error persists even after authorization.

If you get #N/A, the key in your destination sheet does not exist in the source's first imported column. Check for trailing spaces, different capitalization, or numbers stored as text. Try wrapping the key in TRIM and confirming both columns are formatted the same way.

If you get #VALUE!, the column index is probably larger than the number of columns in the imported range, or the index is zero or negative.

If the import is slow or shows a loading error, reduce the range from whole columns to just the rows and columns you need, for example Sheet1!A1:C500 instead of A:C. Very large imports can time out.

If nothing updates after a source change, reload the destination tab. If it still does not update, remove the formula, re-enter it, and re-authorize.

Frequently Asked Questions

Can VLOOKUP pull data from a closed workbook?

Yes, in Google Sheets. IMPORTRANGE works whether or not the source file is open, as long as you have already authorized access.

Do I need edit access to the source file?

You need permission to view the source and to authorize the connection. In practice, edit access is the reliable option; view-only sharing sometimes blocks the Allow access prompt.

Why does my VLOOKUP return the wrong column?

The column index counts from the first column of the imported range, not from column A of the source sheet. Recount starting at the leftmost imported column.

Can I use VLOOKUP across multiple source workbooks?

Yes. Add a separate IMPORTRANGE for each workbook, ideally on separate helper tabs, and point each VLOOKUP at the right helper range.

Does IMPORTRANGE update automatically?

It refreshes periodically, but not instantly. For time-sensitive data, reload the destination sheet before relying on the values.

What is the alternative if VLOOKUP is too limited?

Use INDEX and MATCH, or XLOOKUP where available, which can search in any direction and handle missing columns more gracefully.