Skip to content

Look up a value from another file or tab

Pull matching data from a different tab, or from another Google Sheets file with IMPORTRANGE.

The formula

Argument separator
Excel · Excel 365 and Excel 2021. Sheet names with spaces need single quotes.
=XLOOKUP(A2, 'Price List'!A:A, 'Price List'!B:B, "")
Google Sheets · Replace FILE_ID with the other file's ID. The first time, click "Allow access".
=IFERROR(VLOOKUP(A2, IMPORTRANGE("https://docs.google.com/spreadsheets/d/FILE_ID", "Price List!A:B"), 2, FALSE), "")

How it works

  1. 'Price List'!A:A

    A column on another tab. Quotes are needed because the tab name has a space.

  2. IMPORTRANGE("…", "Price List!A:B")

    Google Sheets only: reads a range from a different spreadsheet file.

  3. ""

    Leave the cell empty when there is no match.

Example

A: SKUB: Result (price)
SKU-19.99
SKU-724.00
SKU-0

Tips

  • In Excel, linking to another workbook works but breaks if the file moves. Copying the price list into a tab is more reliable.