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

Written by Allen Wyatt (last updated March 20, 2020)
This tip applies to Excel 2007, 2010, 2013, and 2016


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. ...


Changing the Type of Page Numbers Used in Headers or Footers

Like to have your page numbers displayed using different types of numbers? Here's how you can choose from the several ...

Discover More

Using AutoComplete with Disjointed Lists

AutoComplete can help you to more quickly enter information in a worksheet. How it works, behind the scenes, can affect ...

Discover More

Adding Smart Quotes through Macro Text

When text is added to your document by a macro, and that text includes quotes or apostrophes, Word won't change 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)

Getting Rid of Everything Except Numbers

Got some numbers and letters mixed up in the same cell? You may need to get rid of those letters so you are left with ...

Discover More

Undoing Actions in Only the Active Workbook

When you undo actions within Excel, those steps you undo may affect the multiple workbooks in which you've been working. ...

Discover More

Entering the Current Time

Need to enter the current time into a cell? It's easy to do using this keyboard shortcut. The shortcut is a handy one to ...

Discover More

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

View most recent newsletter.


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}] (all 7 characters, in the sequence shown) 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 nine more than 7?

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


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


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


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

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.