Forum Discussion
rhowell
Jun 05, 2025Copper Contributor
Help with XLOOKUP
=XLOOKUP([@Name],'[May 2025 Metrics.xlsx]Individual Tech Summary'!$A:$A,'[May 2025 Metrics.xlsx]Individual Tech Summary'!$D:$D)
Let me say thanks in advance for any help with this.
I have to pull numbers for each of my technicians into a spreadsheet from multiple excel files that are sent each month. I muddled through a few web pages on XLOOKUP and was able to get the above to work. The screenshot is just a snip-it of the file I'm working in, and it goes out to column U with all the various categories (nothing crazy). Since I have to do this for monthly reports and the quarterly report, I have the same little snip it copied 4 times on the same worksheet (tab?).
It's one thing to have to set this up once copying the above formula and just having to change what destination column is referenced "!$D:$D", but having to change the destination file name twice for each column that is using this formula is killing me as the file names are always changing.
Is there a way I can modify this to use a cell reference to somewhat automate this? I would like to be able to type in the file name into say cell D2 and it use that to complete the formula.
Example:
=XLOOKUP([@Name],'[D2]Individual Tech Summary'!$A:$A,'[D2]Individual Tech Summary'!$D:$D)
and on cell D2 it would have either "[May 2025 Metrics.xlsx]" or "May 2025 Metrics.xlsx". I hope this makes sense? That way I can just update the name for June 2025, July 2025, Q3 2025, Q4 2025, March 2029... you get the idea I hope.
If the other workbook will be open in Excel too, you can enter its file name in D2 (in the form May 2025 Metrics.xlsx), and change the formula to
=XLOOKUP([@Name], INDIRECT("'["&D2&"]Individual Tech Summary'!$A:$A"), INDIRECT("'["&D2&"]Individual Tech Summary'!$D:$D"))
1 Reply
Sort By
If the other workbook will be open in Excel too, you can enter its file name in D2 (in the form May 2025 Metrics.xlsx), and change the formula to
=XLOOKUP([@Name], INDIRECT("'["&D2&"]Individual Tech Summary'!$A:$A"), INDIRECT("'["&D2&"]Individual Tech Summary'!$D:$D"))