Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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: Stopping a Formula from Updating References.

Stopping a Formula from Updating References

by Allen Wyatt
(last updated February 14, 2015)

2

David wonders if there is a way he can make a formula not automatically update when he inserts a column that would otherwise affect the formula. For instance, if he has the formula =SUM(B:B) and then he inserts a column to the left of column B, the formula is automatically updated by Excel to =SUM(C:C). He doesn't want the formula to update; he still wants it to refer to column B after he inserts the new column.

One way to get the result you want is to use the OFFSET function to refer to column B. For instance, consider the following formula:

=SUM(OFFSET(A:A,0,1))

If this formula is in a cell, and you insert a column before column B, then the formula doesn't update; it still refers to column B. Why? Because the formula refers to column A and you didn't do anything to move column A. If you did insert a column before column A, then the formula would update to reference column B.

This means that the best way to handle the formula is to use the INDIRECT function, in this manner:

=SUM(INDIRECT("B:B"))

The INDIRECT function uses text for a parameter, and since it is text it is not considered a reference to be updated by Excel. Regardless of inserting or deleting columns, the formula will always refer to column B.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10786) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Stopping a Formula from Updating References.

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

Turning On Property Information Prompting

You may want to make sure that users of a document fill in the properties associated with a document. In most versions of ...

Discover More

Debugging a Macro

Part of writing macros is to make sure they work as you expect. This involves a process known as debugging. Here's how you ...

Discover More

Using a Single Instance of Excel with Two Monitors

Working on a computer system that has multiple monitors can help increase your productivity. If you want to work with ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Filling References to Another Workbook

When you create references to cells in other workbooks, Excel, by default, makes the references absolute. This makes it ...

Discover More

Shortening ZIP Codes

US ZIP Codes can be of two varieties: five-digits or nine-digits. Here's how to convert longer ZIP Codes to the shorter ...

Discover More

Adding Dashes between Letters

When processing some text data, you may need to perform some esoteric function, such as adding dashes between letters. While ...

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 nine more than 8?

2015-02-16 11:03:36

balthamossa2b

As Barry, I recommend using named ranges to INDIRECT.

INDIRECT (OFFSET too) is volatile, meaning that it will recalculate whenever ANY cell in the workbook is modified, instead of just recalculating when a cell in its formula is modified. For big files, this can slow things down.


2015-02-14 06:01:21

Barry

Another way is to use Named formulas, which are useful when copying the formula.

You have to bear in mind and be careful that cell references are in effect considered to be relative to the cell selected when the formula is created.

For example with cell A2 selected create a formula called "OneAbove" with a value =A1. Entering "=OneAbove" (without quotation marks) will return the content in the cell immediately above it (except if in row 1). This will always be the case even if you insert a row immediately above the cell containing the formula.

This can be overridden by prefixing the row and/or column reference with a "$". This the exact opposite to the way in which absolute/relative references normally work in an ordinary formula.


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.