Forum Discussion
JonathanHolt
Dec 22, 2022Copper Contributor
Searching for information in one spreadsheet and returning it another
I am trying to get information in one spreadsheet to appear in another using VLOOKUP and XLOOKUP. Can you help?
Jamespg6
Dec 23, 2022Copper Contributor
assuming your source information table is laid out the way I think it is, the following should work for you:
=XLOOKUP(F5,'All People'!$L:$L,'All People'!$P:$P)
XLOOKUP and VLOOKUP take a value, match it to a corresponding value in a defined range, and return the matching information from another. F5 needs to be your Name (ideally unique, so an employee code might be better), ‘All People’!$L:$L needs to be the search range (I.e. where the names are kept) and ‘All People’!$P:$P should be where the information you want to return is. In your example you referenced a specific cell for the last two, rather than the range where the information could be found.
JonathanHolt
Dec 23, 2022Copper Contributor
Thanks James. I took your advice and changed 'name' to 'employee code' and it worked. Have a Merry Christmas! Jonathan