Google-sheets – Google Sheets-Match IDs in different tabs to fill column

google sheets

I have a Google Sheet with two tabs. Tab A has IDs and a place where I want to fill a column. Tab B has the Same IDs and the data I want to fill into Tab As blank column. I want to auto-populate the Tab A Column with the data from Tab Bs column.

In practice, I have a dataset (tab A) with place names and IDs, and a data set (tab b) with IDs and Population. I want the population to fill into Tab A based on the matching IDs.

Best Answer

you probably want this: =ARRAYFORMULA(IF(LEN(A2:A); VLOOKUP(A2:A; 'Tab B'!A2:B; 2; 0); ))

which means that IF ID from Tab B is found in Tab A, formula will return 2 (second) column from range A:B of Tab B in sorted order based on IDs in A column of Tab A - hence that 0

here is demo spreadsheet: https://docs.google.com/spreadsheets/d/