I have two tables.


ID            NAME
A01           John
A02           Peter
B01           Marta

Then I have a second table (note that this table purposely has more entries).

ID             SURNAME
A02            Smith
B01            Clevens
A03            Rogers
A01            Brown

Both tables represent the same people with Names and Surnames, identified by ID. How I can join the data into one table and align the people correctly?

Desired results

ID          NAME        SURNAME
A01         John        Brown
A02         Peter       Smith
A03                     Rogers
B01         Marta       Clevens

I think my first approach is to create a new table with all the unique ID, and use the VLOOKUP function to bring in the [NAME, SURNAME] columns into that new table.

enter image description here

If you're not familiar with VLOOKUP, it's a great function. This screenshot, should explain what it's doing better.

Obviously, I would put the new table in it's own sheet, I just put it all in one sheet for simplicity and to show you the examples.

enter image description here

Here is a link to a Google Sheet with a VLOOKUP example.

Your Answer

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