Forum Discussion

klauselt's avatar
klauselt
New Member
3 years ago
Solved

get current file name

Hello, I need a solution for getting the file name of the file, I am currently working with. The filename contains the project number and the file ist automatically created and named. I want to ex...
  • BA_Pete's avatar
    BA_Pete
    3 years ago

    There's no function that I'm aware of in PQ that will get this info for you.

    If you're able to add this cell onto a worksheet in your workbook and not have it overwritten, then this would be the simplest, as you could then just grab that cell into PQ and get your project number using a combination of Text.BetweeDelimiters and Text.Range.

    Failing that, I think you'd have to go into VBA.

     

    PS: For a huuuuge time-saver, I think you can actually write the Excel formula just as:

    = CELL("filename")

     

    Pete