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.

migrated from superuser.com Sep 5 '18 at 20:08

This question came from our site for computer enthusiasts and power users.


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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy