+ Reply to Thread
Results 1 to 4 of 4

Formula with cell reference not working

  1. #1
    Registered User
    Join Date
    02-08-2008
    Posts
    2

    Formula with cell reference not working

    I can get the following to work jsut fine:
    ='C:\test\TAL\[TAL_3.xlsx]TAL'!$D$11

    However I need to have "TAL_3.xlsx" by a dynamic reference to a cell.

    I have tried the following with no luck:
    =INDIRECT("'C:\test\TAL\[" & INDIRECT("A8") & "TAL_1.xlsx]TAL'!$D$11")

    Big picture I have a column of data that contains, TAL_1, TAL_2, TAL_3, etc. For each TAL_# I need to pull a status from that file. Trying to avoid a macro...but that might end up being the solution.

    Is there anyway to get this to work. Other languages have an 'eval' command that would interpret a variable, but have not found anything like this in excel.

    Would appreciate any help.

    Thanks in advance!

    Ron

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    This should work assuming that A8 contains "TAL_3" (no quotes) is in A8.
    =INDIRECT("'C:\test\TAL\[" & A8 & ".xlsx]TAL'!$D$11")
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    02-08-2008
    Posts
    2
    Well that works...partially. After a little more debugging it looks like the file has to be open . Is there a way to have this coded so I can just open the one file, and the foruma will automatically look in the other files without them having to be open???

    Thanks again for the help.

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    INDIRECT requires the file to be open before it will work.

    I believe that morefunc has some addins that will work with a closed file, but I've never used them.

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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