Hello .

i am wondering .

is it possible to link certain data to each other ?

for example lets take this

we have personnumbers and the names (each person has his own number

Personnumber Name

123 Els

248 Jake

347 Sven

457 Lucy

499 Chyntia

512 Laura

534 Kate

579 Jack

try to imagine this is a list of 1000+ people (since thats what its in real)

is it possible that when i for example need again the info of Laura and i type that in the collum Name that he automaticly give the personnumber 512 in the collum of personnumber ? if so how is this possible or could this be done .

thanx a lot

# linking data

## Answers

Hi Sylvia, it's possible to do that the other way around. You can have it so that the name will appear when you type in the correct person-number.

The reason it won't work correctly to return the person-number when you type in the name is because names are not at all unique. So, when you type in Sylvia and there are 8 Sylvias, which one should it refer to in order to return the correct person-number?

If you want to input the name based on the person-number, you can use any lookup function such as the Vlookup function or Index/Match functions to do that.

### Discussion

Assuming you have first name and last name in different columns the formula below would find the ID number where both criteria are mached. Note that it is an array formula which must be confirmed with SHIFT+CTRL+ENTER in place of the usual Enter only. Type the formula in the Formula Bar (above the worksheet grid), then hold down SHIFT+CTL and hit ENTER before releasing the two keys. The formula will be displayed surrounded by curly braces in the formula bar. If not entered correctly it will show #N/A as result.

`=INDEX('Source Sheet'!$G:$G,MATCH(1,('Source Sheet'!$C:$C=`**$A2**)*('Source Sheet'!$B:$B=**$B2**),0))

For the purpose of this formula I created a "Target" sheet with the first name in column A and the last name in column B. The formula is designed to go into C2 of that same sheet and can be copied down. Its references to A2 and B2 are bolded above.

The "Source Sheet" is the sheet where the ID number exists. On that sheet I put the first name in column C, the last name in column B and the ID number in column G.

The formula ill extract the value from 'Source Sheet'!$G:$G where 'Source Sheet'!$C:$C=**$A2** and 'Source Sheet'!$B:$B=**$B2**. Adjust the references as required.