+ Reply to Thread
Results 1 to 3 of 3

Get tables from multiple files

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    switzerland
    MS-Off Ver
    Excel 2010
    Posts
    38

    Get tables from multiple files

    Hey guys

    Assume I have three files:

    week1.xlsx, containing data from row 1:10 and column A:F
    week2.xlsx, also containing data from row 1:10 and column A:F

    and

    main.xlsx, the file I work with, which contains the worksheets T-1 and T

    The directory is:

    C:\work

    Ok, now, when I load the week1.xlsx into the worksheet T-1 in main.xlsx, I do it like this:

    =[week1.xslx]Sheet1!$A$1:$F$10

    That works just fine. I do the same with the week2.xlsx into the worksheet T!

    And then excel 2010 automatically adds a directroy header into the formula in both worksheets, like this:

    ='C:\work\[week1.xslx]Sheet1'!$A$1:$F$10
    ='C:\work\[week2.xslx]Sheet1'!$A$1:$F$10

    Question 1: Why is that?

    Question 2:

    I can generate the String "'C:\work\[week1.xslx]Sheet1'!$A$1:$F$10" easily.

    Problem is, that if I use it in the indirect function like this

    =INDIRECT('C:\work\[week1.xslx]Sheet1'!$A$1:$F$10)

    it does not work? Why?

    Excel 2010 throws #REF! error

    I'd appreciate some help a lot.
    Thank you in advance

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Get tables from multiple files

    Question 2
    shouldnt that be
    =INDIRECT("'C:\work\[week1.xslx]Sheet1'!&$A$1:$F$10")
    Note: Double quotes added, your single quotes are still present
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    switzerland
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Get tables from multiple files

    Oh,

    I found it!
    Excel's INDIRECT function does not support closed workbooks ... well, I am trying other workarounds. Thanks anyway

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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