+ Reply to Thread
Results 1 to 26 of 26

Help! Problem using Indirect function to update master workbook from linked files

  1. #1
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Exclamation Help! Problem using Indirect function to update master workbook from linked files

    I require to update a Master workbook, with data from linked workbooks (not sheets).
    There are 100+ linked workbooks from which I require to collate data into the master workbook.
    I ended up using Indirect function for this, but it does not update data from closed workbooks, and so far what I read seems that this is the way excel works.

    I don't think opening 100+ workbooks at the same time is a good idea, for the system may just run out of resources.
    When trying opening one linked workbook at a time, this is what I saw:
    If I open linked workbook, say feature1.xlsx, the row associated to this gets updated correctly in the master.xlsx
    Now, if I save the master, and close feature1.xlsx, then open feature2.xlsx, data related to feature2.xlsx is updated properly, but the feature1.xlsx gets lost back to #REF.
    I really need to get a solution for this, please help!!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Indirect will not work on closed sheets. It's a little "feature" that is a bit irritating. If you can use 3rd party add-ins, there's a useful (free) thing caled "Morefunc", which includes INDIRECT.EXT, which is just like INDIRECT, except that it works on closed sheets, as well. Google either of these if you can use them.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Hi,

    Welcome to the Forum.

    Looks like you would need a VBA macro code for your requirement. Try modifying the code in the below link to suit your needs.
    Import data from a closed workbook (ADO)
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  4. #4
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Thanks for the replies. I tried the Morefunc option. I'm using excel2007.
    Changing INDIRECT to INDIRECT.EXT did not work any differently than INDIRECT. Only when I opened the linked workbook did the values get updated.
    What might I have done wrong? Are there any settings to be done to make this work?

  5. #5
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Again thanks for the replies. I also tried the macro option suggested on this thread. I copied and pasted the code in the second block:
    Please Login or Register  to view this content.
    What I got was a compile error, saying Compile error, user defined type not defined
    And this was pointing to the line: "Dim dbConnection As ADODB.Connection, rs As ADODB.Recordset"
    Kindly excuse if this is something basic, as I am a newbie with macros.
    Last edited by FDibbins; 06-09-2014 at 04:31 AM.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Help! Problem using Indirect function to update master workbook from linked files

    @ treetrunk...Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I have added them for you - this time
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    @FDibbins, thank you.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Odd.

    Here is an example of a working script (minus the "=" sign).

    INDIRECT.EXT("'C:\Users\1003011\Documents\Depot\03 December 2013\02 XLSX\["&$A4&".xlsx]Summary'!c17")

    It is picking up a name (MYNAME) from cell a4 of the open document, and returing cell C17 from the sheet called Summary, from MYNAME.xlsx, filed at the location shown.

  9. #9
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    @Glenn, thanks, But when I tried this:
    =INDIRECT.EXT("'C:\Users\Administrator\Desktop\FS\7\Sta\["&$A5&".xlsx]Testcases'!L8"); which is intended to get the value (say "feature1") of cell A5 from the current workbook, and getting the value of the feature1.xlsx book, sheet: Testcases, cell L8, I get #NAME? in the result cell.
    It will be great if this can somehow work...what may now be wrong?

    It may be that INDIRECT.EXT is not properly recognized, cause when I evaluate the formula, it shows #NAME?(.content of brackets as above....)
    Are any settings required to make the MoreFunc INDIRECT.EXT work?
    Last edited by treetrunk; 06-09-2014 at 06:32 AM.

  10. #10
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Help! Problem using Indirect function to update master workbook from linked files

    To include macros in your function, after opening your workbook, you use the shortcut key Alt + F11 to open the Excel VBA Editor.

    After the VBA Editor window is opened, you need to place the Sub function in your post #5 inside a module. Also you need to add References from the tools menu if any required. And you need to place a button on your worksheet to call the sub or you can use the shortcut key Alt + F8 to invoke the function.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Sorry if this is a silly question - but have you installed it as an add-in? If you go to formulas/insert function/category do you see morefunc at the bottom of the drop down list of categories?

  12. #12
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    @Glenn, must have been something with the installation. It seems to be taking the references now. Will update again. Thanks!!

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Wooo Hooo!! Getting towards a result...

  14. #14
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    One followup question w.r.t INDIRECT.EXT:
    =INDIRECT.EXT("'<Path need value from cell C3 here>\["&$A5&".xlsx]Testcases'!L8")
    How can this be done?
    I tried:
    =INDIRECT.EXT("'"&$C3&"\["&$A5&".xlsx]Testcases'!L8") - didnt work
    =INDIRECT.EXT("'"$C3"\["&$A5&".xlsx]Testcases'!L8") - didnt work
    etc..

    It will be required to get the values for the path from two cells
    so the path will be
    <main path in cell C3>\<subfolder name in cell B2, B3....etc as per row no>

    This is the last link...if this can be fixed it will be wonderful.
    Last edited by treetrunk; 06-09-2014 at 10:41 AM.

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    What EXACTLY is in C3?

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    You might need to add the sheetname as well as the cell number. I'll have a look at some other places where ive used INDIRECT.EXT

  17. #17
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Hi Glen, Sorry if I confused the requirement when stating it.
    I have a path to the final folders where the workbooks are kept, from which data is to be collected
    C3 has path to the parent folder let's say: "C:\Users\Administrator\Desktop\FS\7\"
    Now, under this folder, there is are final level folders like Sta, Both and Mo (saved in B2,B3...etc)
    Under which the workbooks are kept.
    I need to pick up the cell contents from C3 and B2,B3 etc...with the indirect function.
    I don't want to hard-code the path.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    You need more than 1 INDIRECT function to make it wiork. It's too late to try to work out the syntax for today....

    No you don't. See below.
    Last edited by Glenn Kennedy; 06-10-2014 at 02:31 AM. Reason: I wuz wrong...

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    OK, here we go again. I have attached two files to let you see how it worked. Put them in the same place and amend row A entries to reflect your situation & BINGO... it works (or at least it waas working when it left here!!).

    One critical point. There is a single tick at the start of each entry in column A. You can see it in the formula bar, but not in the actual cell. You need it.

    I find INDIRECT.EXT to be totally frustrating & totally invaluable at one and the same time. It IS worth working at!!
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Thank you Glen. It seems to be working...need to tweak it a bit and hopefully this will nail the requirement. Can't thank you enough!

  21. #21
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Thanks. If that's everything working as it should, can you mark the thread as solved?

  22. #22
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Just one more thing, I don't know how this happened, but the INDIRECT.EXT became unrecognized by Excel suddenly. The results disappeared and the INDIRECT.EXT was not listed in the available formulae list.
    Then, I closed Excel and reinstalled it again, and it started working again.
    This happened twice. Is there certain a way to install this application so this does't happen again?

  23. #23
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    And. how to mark a thread as solved?

  24. #24
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: Help! Problem using Indirect function to update master workbook from linked files

    In your thread, below the thread title on the right side, you can find a menu titled Thread Tools. Click that and choose "Mark this thread as SOLVED" to mark it solved

  25. #25
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Sorry, I haven't seen this problem before and, like you, I'm using Excel 2007.

  26. #26
    Registered User
    Join Date
    06-05-2014
    Posts
    13

    Re: Help! Problem using Indirect function to update master workbook from linked files

    Thank you!

+ 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. my INDIRECT formula only works when the linked workbook is open
    By apiekar42 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-12-2013, 06:46 PM
  2. [SOLVED] Cell reference issues with excel files linked to one master
    By Dermur1212 in forum Excel General
    Replies: 5
    Last Post: 08-02-2013, 10:47 AM
  3. Replies: 1
    Last Post: 04-12-2012, 03:42 AM
  4. update master files from multiple children files
    By natalie.phuong in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2009, 03:34 AM
  5. How to automatically update workbook linked to other excel files?
    By newnothing in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 07-25-2009, 11:57 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