+ Reply to Thread
Results 1 to 2 of 2

Running formulas on worksheets after importing them from other workbooks

  1. #1
    Registered User
    Join Date
    01-10-2010
    Location
    Arlington VA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Running formulas on worksheets after importing them from other workbooks

    I have a workbook that uses VBA code to import additional sheets from another workbook. The code is shown below. The problem is that any functions that reference the imported sheet return #Ref! even after the sheet is imported. I have attached two spreadsheets to demonstrate this problem as follows.

    1. Open the "Calculation Workbook" and enable the macros.
    2. The function is in the blue highlighted cell and references the "Data Sheet"

    Please Login or Register  to view this content.

    3. Press the "Import" button which will prompt you for a file, select the "Data Workbook" This will add the "Data Sheet" to the "Calculation Workbook".
    4. Go back to the "Calculation Sheet"
    5. Use the drop down list in the red highlighted cell to select "TRUE" This enables the formula in the blue cell to run.
    6. The function should sum the cells 'Data Sheet'!A1:A30 and return a value of 150.6919 but it returns #Ref!
    7. If you select the blue cell and then click into the function box and hit enter the function will run as it is supposed to.

    Can anyone explain how to get the function to run properly once the sheet is imported?

    Thanks

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Running formulas on worksheets after importing them from other workbooks

    I believe your attachment got "lost" in the system upgrade...please re-attach.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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