VLOOKUP
=IFNA(VLOOKUP(A2,Products!A:C,3,FALSE),"Not found")Works when the lookup column is first.
Match an ID on one tab and return a field from another tab.
Match an ID on one tab and return a field from another tab. Use =XLOOKUP(A2,Products!A:A,Products!C:C,"Not found"), then replace the sample ranges with the columns in your sheet.
XLOOKUP matches A2 against the product ID column and returns the corresponding price.
| A | |
|---|---|
| 1 | Product ID |
| 2 | |
| 3 | |
| 4 |
=IFNA(VLOOKUP(A2,Products!A:C,3,FALSE),"Not found")Works when the lookup column is first.
=IFNA(INDEX(Products!C:C,MATCH(A2,Products!A:A,0)),"Not found")Works in older Sheets files.
=XLOOKUP(A2,IMPORTRANGE(F1,"Products!A:A"),IMPORTRANGE(F1,"Products!C:C"))Reads data from a separate spreadsheet.
Wrap the sheet name in single quotes.
Convert both ID columns to the same data type.
Wrap the sheet name in single quotes.
Convert both ID columns to the same data type.
Send this recipe to the SheetSteps assistant and describe how your columns are arranged.