+ Reply to Thread
Results 1 to 9 of 9

"create" path to a file

  1. #1
    Registered User
    Join Date
    11-09-2021
    Location
    spain
    MS-Off Ver
    365
    Posts
    6

    "create" path to a file

    excel.jpg

    hello!
    I would to create a path like in the image.
    Is difficult to explain because I'm Italian...

    cartel.xlsx need to take some data from other file, in the real world I've a lot of file (like apple, pear....) and I have a column with all path.
    I need to create this path from the cells with path and not write it manually every time.
    I try with INDIRETTO but give me an error #RIF

    thanks for your help
    Attached Files Attached Files
    Last edited by squatter87; 11-11-2021 at 04:04 PM.

  2. #2
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: "create" path to a file

    Welcome to the forum

    The following worked for me with a reference to one of my workbooks in A4
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Note that the referenced file needs to be open or you will get a #REF! (#RIF!?) error.

    Hope this is enough to let you make progress.
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: "create" path to a file

    All though you can reference cells to closed workbooks.
    Using indirect may be too complex for closed workbooks.
    It works when opened, but not when closed.
    -


    indirectFormulaNoWork.jpg

  4. #4
    Registered User
    Join Date
    11-09-2021
    Location
    spain
    MS-Off Ver
    365
    Posts
    6

    Re: "create" path to a file

    Geof, Dave work so good!!
    now we can find the way to do it without open the file please?
    (I do a Macro that can open-refresh-save-close alla file but for 200 file is slow...)

  5. #5
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: "create" path to a file

    A good alternative to access data in closed files is using Power Query (Excel tool), specially if they all are in the same folder and have the same structure.

  6. #6
    Registered User
    Join Date
    11-09-2021
    Location
    spain
    MS-Off Ver
    365
    Posts
    6

    Re: "create" path to a file

    Can you do it please with my 3 attached files? (link A1 in the apple.xlsx in the cartel.xlsx)

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: "create" path to a file

    Hi there,

    See if the approach used in the attached workbook gets you moving in the right direction.

    Cell E2 uses "native" Excel formulas to create a formula based on the Path, File Name, Sheet Name and Cell Address specified in Cells A2:D2.

    The following VBA copies this formula and inserts it as the Formula property into cell F2 - this will retrieve the value from the closed workbook:

    Please Login or Register  to view this content.

    Spero que questo possa aiutarti

    Regards,

    Greg M

  8. #8
    Registered User
    Join Date
    11-09-2021
    Location
    spain
    MS-Off Ver
    365
    Posts
    6

    Re: "create" path to a file

    wow!!!!!!! THANKS A LOT

    Alessio

  9. #9
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: "create" path to a file

    See the instructions for importing with Power Query from folder with many files.

    https://www.youtube.com/watch?v=a7E29H5ZUmE

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 11-09-2020, 05:40 PM
  2. How to make commandbutton to open another workbook "with file path change"
    By Rachel8226 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2019, 09:26 AM
  3. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  4. Create a "XLTM" from a "XLSM" file.....HELP!
    By tnt6869 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2014, 04:31 AM
  5. Set Variable = File Path generates "Object Required" Error
    By Brian48072 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2013, 11:42 AM
  6. Replies: 2
    Last Post: 07-26-2010, 06:59 AM
  7. Macro to create "path" for save
    By Chris in forum Excel General
    Replies: 4
    Last Post: 03-15-2006, 06:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1