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 fromTab B
is found inTab A
, formula will return2
(second) column from rangeA:B
ofTab B
in sorted order based on IDs in A column ofTab A
- hence that0
here is demo spreadsheet: https://docs.google.com/spreadsheets/d/