+ Reply to Thread
Results 1 to 11 of 11

Do I need to open the source file to fetch source data by using INDEX/MATCH

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Do I need to open the source file to fetch source data by using INDEX/MATCH

    Hi guys,

    I want to use the following INDEX/MATCH combination to fetch data from an external workbook as:

    =INDEX('C:\Temp\Example.xlsm'!Score,MATCH(A1,'C:\Temp\Example.xlsm'!IDCode,0))

    Do you think this formula will work? I am just not sure if the source file C:\Temp\Example.xlsm must be opened first.

  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,071

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    What happened when you tried it yourself?
    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
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,762

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    The filename (and extension) should be inside square brackets in both cases.

    It is easier to set up references like these if both files are open initially, and then as you are typing in the formula you should just click over to the window of the source file and select your range(s) from there - Excel will automatically use the correct syntax, although it will initially not show the full path if both files are open. Then when you close the source file the path will be included within the formula.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    Many thanks, Glenn and Pete.

    So, do you think that formula will work, without having to open the source file first? I tried myself, it seems working. But I am not really sure, as I used VLOOPUP before which failed to (the source file has to be opened first!)

  5. #5
    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,071

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    I was trying to encourage you to try it out first, rather than asking the question without having experimented yourself.
    However, I do know that it won't work unless you put square brackets round the filensme.xlsx. Then it will work. .

  6. #6
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    Yes, Glenn. I tried it out. It seems that it does not work. So what is the job of the square brackets? That is really interesting to me.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,762

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    That is the syntax that Excel imposes - the filename needs to be inside square brackets. Did you try my method of generating the links by clicking on the appropriate ranges?

    Pete

  8. #8
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    Your formula should work as long as Score and IDCode are workbook-level defined names in C:\Temp\Example.xlsm.

    If it's not working, why not follow the recommendation in the yellow box as the top of every page on this site and include example workbooks demonstrating the problem?

    In contrast, something like this works for me. Download both files into the same directory.
    Attached Files Attached Files
    Last edited by hrlngrv; 11-27-2020 at 08:49 PM. Reason: addendum

  9. #9
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    Quote Originally Posted by Pete_UK View Post
    The filename (and extension) should be inside square brackets in both cases. . . .
    Wrong for workbook-level defined names.

  10. #10
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    Yes, Pete. I agree the links can be updated correctly by Excel when the source file is closed.

  11. #11
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: Do I need to open the source file to fetch source data by using INDEX/MATCH

    I tried again and it seems that it does work, as confirmed by hrlngrv.

    Besides, the brackets around the file name are NOT needed. This would be such an easy way to fetch data from external sources without having to open the source file?

+ 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: 2
    Last Post: 07-04-2019, 06:36 AM
  2. [SOLVED] Fetch data based on one string from source to abstrat
    By Punnam in forum Excel General
    Replies: 15
    Last Post: 06-16-2017, 01:16 AM
  3. Replies: 2
    Last Post: 05-21-2015, 05:33 AM
  4. [SOLVED] get data from source table using index and match
    By tehobeng in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 06-18-2014, 03:48 AM
  5. Replies: 0
    Last Post: 05-28-2014, 02:45 AM
  6. INDEX/MATCH function eventually changed the location of the source file
    By seimeion1208 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2013, 07:07 AM
  7. Using INDEX w/MATCH to get data from unsorted source
    By Lynn Bales in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-22-2005, 11:05 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