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
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
'Price List'!A:AA column on another tab. Quotes are needed because the tab name has a space.
IMPORTRANGE("…", "Price List!A:B")Google Sheets only: reads a range from a different spreadsheet file.
""Leave the cell empty when there is no match.
Example
| A: SKU | B: Result (price) |
|---|---|
| SKU-1 | 9.99 |
| SKU-7 | 24.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.