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 March 20, 2020)


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


Avoid Using the Normal Style

The basis of almost all styles in Word is the Normal style. Here's a good reason why you shouldn't use it.

Discover More

Automatically Hiding the Personal Workbook

If you leave your Personal.xls workbook visible from one Excel session to another, you may find that you unwittingly make ...

Discover More

ExcelTips: Amazing Array Formulas (Table of Contents)

Array formulas allow you to accomplish amazing things with your data, including things you cannot do with regular ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Changing the Default Paste Mode

Don't like the way that Excel pastes when you press CTRL+V? Here are some ways that you can modify the normal paste mode ...

Discover More

Quickly Filling a Column

Excel has a great (and little known) shortcut for filling a column with information. It comes in very handy when you need ...

Discover More

Copying Cells to Fill a Range

Excel provides two really helpful shortcuts you can use to fill a range of cells, either horizontally or vertically. ...

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 2 + 4?

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.