Search code examples
google-sheetsgoogle-sheets-formulaarray-formulasgs-vlookupimportrange

Compare column A, find adjacent cell data, across two workbooks


  1. I have two Google workbooks

  2. Columns A in both workbooks have a list of phrases

  3. Workbook 2 also has data in columns B & C

  4. I want to compare columns A in each workbook, finding matches

  5. Then when a match is found write data from columns B and C from workbook 2 into columns B and C of workbook 1

Here are two sample sheets to work with.

Workbook 1: https://docs.google.com/spreadsheets/d/1r5wtmIuKtZCZBun1IDvCZe-Q4XbZy3AO_N7muhHHsxA/edit?usp=sharing

Workbook 2: https://docs.google.com/spreadsheets/d/1gOIkIRXvbYhEsJFe_Axklj7Y-vAmn08TfIHvFLW2Hgk/edit?usp=sharing


Solution

  • link your sheets and paste this in B2 cell:

    =ARRAYFORMULA(IFNA(VLOOKUP(A2:A, 
     IMPORTRANGE("1r5wtmIuKtZCZBun1IDvCZe-Q4XbZy3AO_N7muhHHsxA", "Sheet1!A:C"), {2, 3}, 0)))