Share via

XLOOKUP Changes file reference.

Anonymous
2022-11-28T20:44:03+00:00

Hello,

I have an excel file that looks up to a file exported from SAP I use this formula to find the data I need (XLOOKUP($J$1[11-22-2022 example.xlsx]example'!$B:$B,'[11-22-2022 example.xlsx]example'!$N:$N)). I save the file as today's date and archive it for future reference. The issue im runnning into is the fact that the XLOOKUP is looking at the previous days file, when I want to stay on the current. For example "11-22-2022 example.xlsx" I want to always look at just "example.xlsx" any ideas?

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-11-29T02:36:30+00:00

    Hi noah.disch,

    It is by design that if you changed the file name, the path in formula will also be changed.

    As a workaround, you can copy the file and rename to "11-22-2022.xlsx" for backing up and just replace the old example.xlsx with the new file exported from SAP.

    Another way is to replace "11-22-2022 example.xlsx" to "example.xlsx", it will also change all the formulas.
    ![](https://learn-attachment.microsoft.com/api/attachments/369261e8-25b2-4389-9ce8-8301596e6183?platform=QnA

    Was this answer helpful?

    0 comments No comments