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


Backing Up Your Custom Dictionaries

When you work with the spelling checker quite a bit, you eventually end up with a sizeable custom dictionary. You might ...

Discover More

Macro Runs Slowly, but Steps Quickly

When you have a macro that processes a huge amount of data, it can seem like it takes forever to finish up. These ...

Discover More

Moving the Taskbar to a Different Edge of the Screen

The Taskbar is normally displayed along the bottom edge of the screen. Windows gives you the flexibility to decide where ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Jumping to a Range

Need a quick way to jump to a particular part of your worksheet? You can do it by using the Go To dialog box.

Discover More

Automatically Adding 20% to an Entry

When you are developing a worksheet for others to use, you may want to have entries in a particular cell (or cells) be ...

Discover More

Can't Copy Data between Workbooks

Edit a group of workbooks at the same time and you probably will find yourself trying to copy information from one of ...

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}] 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 + 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.