+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Convert text to formula and evaluate

  1. #1
    Registered User
    Join Date
    03-31-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Convert text to formula and evaluate

    Hello,

    I need to access to data from an external excel file and get a value to the current worksheet:

    cell A4 - path of the external excel file: C:\Projectos\QPLC\20100116\Files Sample\
    cell B4 - file name of the external excel: I001 200912.xlsx
    cell C4 - Text corresponding to the formula I need to use: =CONCATENATE(A4;"[";B4;"]";$B$2;"'!";"$B$1")
    cell C5 - Evaluation of the cell C4: =Evalu(C4)

    The cell C5 returns an error #VALUE! instead of the value of the cell B1 of the external excel file.

    Can you give me any suggestion to solve this problem?

    Thanks,
    AJG

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Convert text to formula and evaluate

    Try

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    03-31-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Convert text to formula and evaluate

    It doesn´t work and return an error #REF!

    If the path of the file is removed, it returns the correct value:

    =INDIRECT(CONCATENATE("'[";B4;"]";$B$2;"'!";"$B$1"))

    It is not possible include the full path to ensure that I am using the correct excel file?

    Thanks,
    AJG

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Convert text to formula and evaluate

    Found this in Excel Help

    If ref_text refers to another workbook (an external reference), the other workbook must be open. If the source workbook is not open, INDIRECT returns the #REF! error value.

  5. #5
    Registered User
    Join Date
    03-31-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Convert text to formula and evaluate

    Thanks!

+ 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