I have two sheets in my workbook. one is for unique clients, and the other is a combined table with clients and other details.
Say in Sheet A:
ID | Name | Addr
1 | Peter | 10a...
2 | Aaron | 18...
. | . | .
. | . | .
In Sheet B:
ID | Name | Addr
| Peter | 10a...
| Peter | 10a...
| Aaron | 18...
| Aaron | 18...
I want to set the ID in sheet B according to the client details. Say, if the content of column “Name” and “Addr” in sheet B equals to the content in “Name” and “Addr” in sheet A, then put the value of “ID” sheet A into sheet B.
So, sheet B should be like this:
ID | Name | Addr
1 | Peter | 10a...
1 | Peter | 10a...
2 | Aaron | 18...
2 | Aaron | 18...
How can I do this?
Use VLOOKUP with Concatenate:
In Sheet 1, create a unique Concatenated Key for each row by concatenating Name and Address.
&is the concatenation operator. Formula:=B2&C2Now in Sheet 2, use VLOOKUP using the Concatenated Key:
Some important points here:
Sheet 1:
Sheet 2: