Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Errors when Copying References to External Cells.

Errors when Copying References to External Cells

by Allen Wyatt
(last updated July 2, 2016)

6

Kirk noted that if he copies a cell referencing a cell in an external workbook, he gets an error. However, if that external workbook is open when he does the very same steps, he does not get an error message. Kirk wonders why this occurs.

There could be a variety of reasons for this happening. The most probable is that for whatever reason the information that it must get from the external sheet is unavailable or cannot be located.

Another possible reason is that your formula could be an INDIRECT link or the workbook could have been opened and the links not updated. If the formula is complex, Excel requires that the external workbook be open. (Microsoft has never provided a clue as to what constitutes "complex" in this case. Basically, if you get an error, the formula is "complex.")

In general, you could consider a formula complex if it does a calculation on the external data to get a result, such as with MATCH, LOOKUP, etc. An example would be storing a month number in workbook A and using that value to calculate year-to-date costs from monthly data stored in individual cells in workbook B. (In other words, you use the month number as an index to access the information in workbook B.)

A workaround for some (but not all) situations is to do the complex calculations completely in workbook B with workbook B linking to workbook A to get the data needed for that calculation. Retrieving the month number from workbook A is not complex and can be easily done by Excel. You could then open workbook A and have it read the result of the calculation from workbook B.

Most of the time, it's best if you can avoid cross-referencing cells between workbooks. If that's not an option, then constructing a macro to open and close all of the required workbooks is the best way to go.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11683) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Errors when Copying References to External Cells.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Understanding Decimal Tabs

Word offers a variety of tabs that define different ways to align text. If you need to align numeric values, you'll become ...

Discover More

Making a Longer Quick Access Toolbar

The Quick Access Toolbar is where you put all the tools to which you need quick access. (Makes sense, huh?) There are limits ...

Discover More

AutoCorrecting from the Context Menu

Microsoft made what no-doubt appeared to be a small interface change to the Context menus in Word 2013. Problem is, the ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Ensuring Standard Units During Data Entry

Need to make sure that information entered in a worksheet is always in a given unit of measurement? It's not as easy of a ...

Discover More

Deleting Everything Except Formulas

Need to get rid of everything in a worksheet except the formulas? It's easier to make this huge change than you think it is.

Discover More

Checking for an Entry in a Cell

You may be looking for a way to have a formula determine if a particular cell has anything in it. Here's how you can find the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 + 6?

2017-06-23 17:36:01

Dennis Costello

There are 4 functions that are particularly prone to causing this problem that you might not expect: CountIF, CountIFS, SumIF and SumIFS. SUM and COUNT generally do not. INDIRECT and OFFSET do. Match and xLOOKUP generally do not.

All of the above applies in this situation, which is a little different than was posed above:
- you open workbook A
- you open workbook B, and put into it references to workbook A using any of the functions mentioned above.
- close both workbooks
- come back later and open workbook B but not workbook A: Where you expect numbers, you get #VALUE!.

I use the COUNTIFS and SUMIFS functions a lot in what I do, and across workbooks. As Allen implied, I figured out I needed to put these functions into the same workbook as the cells to which they refer (workbook A in my case study above), and then in the referring workbook (B in my case), put in "hard links" to those cells in workbook A. Apparently, Excel caches in the cells in workbook B the last value it saw for those hard links if workbook A is not open when you open workbook B, and updates them if you subsequently open A while B is still open (that's why open a workbook triggers a recalc cycle).

As to why this caching doesn't work for a handful of functions, I can't say.


2016-07-10 19:55:17

Mark Fitzgerald

Formulas containing references to named ranges or structured references to tables in the linked workbook will return #REF! errors if the linked workbook isn't open. Replacing those references with range addresses will often work even if the linked workbook is closed.


2016-07-07 02:59:32

Yann

I had this kind of problem when updating my On-Time-Delivery indicators. I finally found another solution.
If you create an array formula to get your data from the external workbook, whatever complex the array formula is, then you do not need the external file to be opened anymore. The errors that appeared before are turned into the desired result.


2016-07-05 02:51:45

Chris

Philip
I thought workspaces were no longer available in the "new" excel?


2016-07-03 05:50:38

Uche Uche

Just to say thanks for your excellent works and selfless assistance to us all who are students of excel, could you please add one method, guideline of how one can create a micro. Thanks


2016-07-03 04:11:08

Philip

Even better than constructing a macro to open and close all of the required workbooks, is saving the set of workbooks as a workspace ...


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.