+ Reply to Thread
Results 1 to 13 of 13

Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

  1. #1
    Registered User
    Join Date
    08-08-2016
    Location
    Oslo
    MS-Off Ver
    2010
    Posts
    6

    Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Hi,
    I am trying to use Index/Match function with a dynamic path referring to external CLOSED workbooks. I need a dynamic path because I have several workbooks with different names.

    What I am struggling with is the dynamic part of the formula as it works when I use Index/Match with a hard coded path.

    I have already tried to combine Index and Indirect, but I later realized that Indirect dose not work with closed workbooks.

    I have tried also the INDEX(CONCATENATE version, but I still get the "VALUE" error.

    I will try to give you an example here below.

    Folder path where all the workbooks are stored:
    Q:\Models

    File names of the different workbooks:
    A_Model
    B_Model
    C_Model
    D_Model

    Now, if I use INDEX(array, row_num, [column_num]) it works

    Example:
    =INDEX('Q:\Models\[A_Model.xlsm]Model'!$A:$E,row_num,[column_num])
    =INDEX('Q:\Models\[B_Model.xlsm]Model'!$A:$E,row_num,[column_num])
    =INDEX('Q:\Models\[C_Model.xlsm]Model'!$A:$E,row_num,[column_num])
    =INDEX('Q:\Models\[D_Model.xlsm]Model'!$A:$E,row_num,[column_num])
    =INDEX('Q:\Models\[E_Model.xlsm]Model'!$A:$E,row_num,[column_num])

    Now let's suppose I want to have dynamic links such that the file name (A,B,C,D etc..) changes dynamically.

    Let's say I put all the file name in cells A1:A5

    A1=A
    A2=B
    A3=C
    A4=D
    A5=E

    and now I combine INDEX and CONCATENATE so to achieve a dynamic patch.

    =INDEX(CONCATENATE("'Q:\Models\[",A1,"_Model.xlsm]Model'!$A:$E"),row_num,[column_num])
    =INDEX(CONCATENATE("'Q:\Models\[",A2,"_Model.xlsm]Model'!$A:$E"),row_num,[column_num])
    =INDEX(CONCATENATE("'Q:\Models\[",A3,"_Model.xlsm]Model'!$A:$E"),row_num,[column_num])
    =INDEX(CONCATENATE("'Q:\Models\[",A4,"_Model.xlsm]Model'!$A:$E"),row_num,[column_num])
    =INDEX(CONCATENATE("'Q:\Models\[",A5,"_Model.xlsm]Model'!$A:$E"),row_num,[column_num])

    This should work as the new path is a result of a concatenation, however I get the error VALUE

    Can anyone help me out with this?

    Thank you
    Last edited by Trica; 11-07-2016 at 09:06 AM. Reason: Correction in the example

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,150

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Try

    =INDEX(CONCATENATE("'Q:\Models\[",A1,"_Model.xlsm]Model'!$A:$E"),row_num,[column_num])

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Or try
    =INDEX("'Q:\Models\[",&A5&,"_Model.xlsm]Model'!$A:$E",row_num,[column_num])

  4. #4
    Registered User
    Join Date
    08-08-2016
    Location
    Oslo
    MS-Off Ver
    2010
    Posts
    6

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Hi,
    that is what I have tried to do. (there was an error in my example, which I have corrected). It still does not work.

  5. #5
    Registered User
    Join Date
    08-08-2016
    Location
    Oslo
    MS-Off Ver
    2010
    Posts
    6

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Unfortunately neither solution work:

    =INDEX(CONCATENATE("'Q:\Models\[",A1,"_Model.xlsm]Model'!$A:$E"),row_num,[column_num])
    =INDEX("'Q:\Models\["&A5&"_Model.xlsm]Model'!$A:$E",row_num,[column_num])

  6. #6
    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
    43,984

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    I'm 99.9% certain that you can't get this to work without VBA. I am equally 100% certain that it will work WITH VBA.
    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

  7. #7
    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
    43,984

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Why do you NOT want VBA, when your sheets are macro-enabled (.xlsm)?

  8. #8
    Registered User
    Join Date
    08-08-2016
    Location
    Oslo
    MS-Off Ver
    2010
    Posts
    6

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Hi Glenn,
    I am so "rusty" in VBA that it would take me days to write it myself.

    Do you have any suggestion? I am all ears.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,150

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Post your request on the VBA/Macro forum BUT please cross-reference to this thread to avoid (possible) duplication of effort.

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Please don't, it's a thread duplication. Either ask a moderator to move it, or just change the title

  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
    43,984

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Rustiness isn't a problem. Plagiarism is the solution!!!

    The code you need is in Module 1 of "Pull Lookup". But first... try it out using the two sample files here. This is set up for a simple vlookup, but you can adapt this, I'm sure...

    Download both files (e.g. to Desktop). open Pull lookup, enabling macros. Change the path in C2 to suit your setup. Voila... (hopefully).
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-25-2022
    Location
    Melbourne
    MS-Off Ver
    365
    Posts
    1

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Trying to use the Pull and Source files with CSV data. Do you think that would work? Thanks

  13. #13
    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,926

    Re: Index/Match to dynamic path closed workbook - NO VBA/ADD-IN

    Quote Originally Posted by rcatchlove View Post
    Trying to use the Pull and Source files with CSV data. Do you think that would work? Thanks
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    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

+ 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. [SOLVED] Using Index and Match functions on a closed workbook
    By Driz in forum Excel General
    Replies: 5
    Last Post: 06-23-2017, 02:13 AM
  2. [SOLVED] Index Match Formula in VBA, that utilises Workbook dynamic named ranges
    By JamieW in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2014, 09:39 AM
  3. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  4. [SOLVED] Index Match to closed workbook - not dynamic?
    By brad999 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2013, 08:19 AM
  5. [SOLVED] Sum dynamic range in closed workbook using address/match
    By jeffr27 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-14-2013, 10:15 AM
  6. Need a Dynamic file path to pull the numbers from different closed excel files
    By vishnu01445 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2012, 11:59 AM
  7. Find last row in closed workbook using file path name
    By amazingg64 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2012, 09:22 AM
  8. Getting <REMINDERS> from a CLOSED WORKBOOK in a fixed path
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-11-2011, 04:22 PM

Tags for this Thread

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