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

Setting Maximum Line Lengths in Word E-mail Messages

When you use Word as your e-mail editor, it allows you to format the text of your e-mail messages using tools you are ...

Discover More

Keeping Callouts Positioned

Using graphics to add callouts to your graphics is a common occurrence in Word. Here's how to stop all those graphics ...

Discover More

Creating Charts in VBA

Most charts you create in Excel are based on information stored in a worksheet. You can also create charts based on ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Deriving Antilogs

Creating math formulas is a particular strong point of Excel. Not all the functions that you may need are built directly ...

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

Discover More

Reordering Last Name and First Name

If you've got a list of names in a column, you may want to change the order of each name. For instance, the name have 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 9 + 6?

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.