+ Reply to Thread
Results 1 to 6 of 6

"#REF!" or other errors when linking two files

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    "#REF!" or other errors when linking two files

    (Also posted at Mr. Excel: http://www.mrexcel.com/forum/showthread.php?t=640561)

    I have two Excel files open. One contains a table of data. The columns represent months; the rows represent sales and expense figures for various regions and business units.

    The other file contains formulas which link to the data in the first file. The formulas include VLOOKUP or HLOOKUP. For example, I might have a VLOOKUP intended to return the sales figure for a specific month in a specific region.

    When both files are open, everything works fine; the formulas always return the values that they should.

    However, at times (and the occurrences seem random; I cannot find a pattern), the following problem happens:

    a. With both files open, I recalculate all formulas.
    b. I then save and close both files.
    c. At a later time, I re-open the file with the lookup formulas and do not refresh links (takes much too long; source file is large)
    d. Instead of returning the correct values, the lookup formulas sometimes return either #REF! or simply a value of 0 when there should be some other number there.
    e. As noted, this seems to happen at random; it does not happen every time I open the file.
    f. Even more randomly, it does not seem to affect ALL the formulas. For example, I might have a column of identical formulas that vary only according to which region they are looking up the data for; sometimes, some of the formulas in the column work and some don't.
    g. If I open the source file and recalculate, the problem goes away; the formulas then return the correct values.

    I am (still) using Excel 2003.

    I am totally baffled by this. Any suggestions much appreciated.

    Thank you.
    Last edited by au12010; 06-07-2012 at 06:42 PM. Reason: Add cross-posting reference

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: "#REF!" or other errors when linking two files

    Welcome to the forum.

    can you post the formula or better a dummy file..so others could take a look at it.
    Thanks
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: "#REF!" or other errors when linking two files

    this may or may not help your problem, but when i have had to reference a larger (data) file from a smaller (summary) file using lookups or whatever, and the larger 1 may be closed, i have actually PUT the summary in the larger file (lookups and all), and then just referenced the RESULTS of the summary from the summary file into the data file. it makes the link much simpler and quicker, as well as diagnosing any errors

    give it a shot, what have you got to loose?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    06-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: "#REF!" or other errors when linking two files

    Thanks for your reply. I have attached 2 sample files. The "Source" file is a sample of the type of data that I want to reference with the "Report" file (although the actual source data is much larger: a range of about 200 colums x 3000 rows).

    The "Report" file contains the lookup functions that link to the Source file (shaded cells contain the formulas). When both files are open, it all works perfectly. When "Source" is closed (which is preferable, because of its large size), the lookup formulas in "Report" often return #REF! or just 0 instead of the correct value.

    Thanks again!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: "#REF!" or other errors when linking two files

    Ah, I see what you are saying - just a straight link to a cell in the source file, rather than a lookup function, might indeed solve the #Ref! error problem.

    Unfortunately, I would then lose a lot of functionality. For example, my source file contains expense and revenue data for 8 business units, 7 geographic regions and 120 monthly periods. The "summary" report allows me to look up any desired combination of data (revenue and/or expenses for any region, any unit, any month) and change the parameters with just a keystroke or two, without having the massive source file open. Even better, I can send the summary report file to others so they can generate their own custom reports - they don't have to worry about the large size of the source file, and I don't have to worry about them opening the source file and corrupting my data.

    Thanks so much for the suggestion. I do appreciate your feedback.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: "#REF!" or other errors when linking two files

    yes i do understand your predicament, i developed that technique for a similar requirement. and maybe thats what is causing some of your problems. certain functions just simply dont work on closed workbooks

    maybe you could still just refernce the data needed into your summary file in hidden sheets, and still have the options you need?

    is there perhaps a way that your could still use that approach, and in your data file "extract" all the data you might need, and in your "summary" file just options that will just reference the data that is asked for?

    i had a file with 10 years worth of "waste" data, covering 50+ machines over 3 shifts, with 5 different types of "waste" the management summary (and data entry for that matter) file took over 30 minutes just to open, so i used that approach for the mngt summary and it opened in no time, and still gave them the functionality they needed. the summary file was read-only, so they could play with it but not mess with it

+ 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