Forum Discussion
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?
6 Replies
Let's say you have a value in A2 on the current worksheet.
You want to look up this value in D2:D100 on a sheet named Data Sheet, and return the corresponding value from F2:F100 on that sheet.
=XLOOKUP(A2, 'Data Sheet'!$D$2:$D$100, 'Data Sheet'!$F$2:$F$100, "")
or
=IFERROR(VLOOKUP(A2, 'Data Sheet'!$D$2:$F$100, 3, FALSE), "")
The formula can be filled down if required.
- JonathanHoltCopper Contributor
Hi Hans
I'm still struggling and can't get the formula you suggest to work. The information for each person can only be found on one line, not a range as you suggest, so can you tell me what is wrong with the following formula:
=XLOOKUP(F5,'All People'!$L$4,'All People'!$P$4)
F5 has the name of the person in the first sheet, L4 is where the same name is to to be found in the second sheet called All People, and P4 is the job title of the same person in the second sheet. I want to copy that job title to the first sheet.
Thanks
Jonathan
If you already know that the name is in L4, you don't need a lookup formula. You can simply use
='All People'!$P$4