excel as a database using primary key to copy cells from one page to another

I don’t have access. I am doing this on a Mac.
What is the easiest way to combine rows from two sheets. I have a primary key and secondary key in each sheet. I need to copy the contents of the appropriate cell from one sheet to another.

sheet 1
row k: pkey, key1, target cell

sheet 2
row j: pkey, key1, data cell

I have around 10000 rows in sheet 1 and 160000 rows in sheet 2.

Copy the data cell (sheet 2) to target cell (sheet 1).

Anyone see a relatively simple way to do this?
I would rather not go to a lot of trouble installing and learning to use a database for this one off task.


Just so I’m clear, you’re talking about something like this? I just want to understand if the primary key uniquely identifies each row or if only the primary key in conjunction with the secondary key is unique.

Sheet 1

 | **A** | **B**  | **C**
**1**|PK | SK | TARGET
**2**|A  |  1 | NULL
**3**|A  |  2 | NULL
**4**|B  |  1 | NULL
**5**|B  |  2 | NULL
**6**|B  |  3 | NULL
**7**|C  |  1 | NULL

Sheet 2

 | **A** | **B**  | **C**
**1**|PK | SK | VALUE
**2**|A  |  2 | CAT
**3**|B  |  1 | HARE
**4**|B  |  3 | HORSE
**5**|C  |  1 | GECKO

The easiest way is with a VLOOKUP. If your primary key value is unique across all rows, then you need


A2 is the primary key on your first sheet, A2:C5 is the range on the second sheet. (The dollar signs lock the value in so as you paste the formula down your rows, it doesn’t increment on you). 3 indicates the number of the column value you want to return (third column in the range specified in the prior argument) and FALSE means you want exact matching on the primary key.

If the rows are unique only with the primary key and the secondary key, then I’d add a column and concatenate those values to make a new key field that uniquely identifies each row and use that in the VLOOKUP.

That should do it!
I will have to shift some columns around to make this work, but I see how it will work now. Vlookup is a great tool-I need to become more comfortable with it.