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: Applying Range Names to Formulas.

Applying Range Names to Formulas

by Allen Wyatt
(last updated October 26, 2013)

5

Named ranges can be a great boon when you are writing formulas. For instance, if you assign the name TaxRate to cell A7, you can then use the name TaxRate in your formulas instead of A7. This makes your formulas (and their purpose) easier to understand when you are later working with them.

This approach is great if you have not yet created any formulas. What if you already have a bunch of formulas in your worksheet, and they already reference cell A7 instead of TaxRate? You could, of course, select each formula and edit them to refer to TaxRate instead of A7, but that could be a long process that is prone to mistakes. (My fat fingers often introduce mistakes that I never intended. :>))

The solution is to allow Excel to do the editing for you. It is easy to do; just follow these steps:

  1. Define the named range you want used in your worksheet.
  2. Select the cells that contain formulas.
  3. Display the Formulas tab of the ribbon.
  4. Click the down-arrow at the right of the Define Name tool (in the Defined Names group) and then choose Apply Names. Excel displays the Apply Names dialog box. (See Figure 1.)
  5. Figure 1. The Apply Names dialog box.

  6. Click OK.

That's it; Excel examines your formulas and any reference to cell A7 is replaced with the name of A7, TaxRate.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8266) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Applying Range Names to Formulas.

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

Quickly Changing Font Sizes

A quick little shortcut can help you easily step through different font sizes for whatever text you've selected. Word ...

Discover More

Adjusting Spell Check for Internet Addresses

When you check the spelling of worksheet data, you may want to spell checker to either ignore or check Internet addresses ...

Discover More

Protect Your Document Templates

If you want to protect your templates from accidental changes, the best way to do so is by using Windows instead of Word. ...

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)

Extracting First and Last Words

When working with text phrases stored in cells, it might be helpful to be able to extract words from the phrase. In this tip ...

Discover More

Adjusting Formulas for Top-Added Rows

Formulas are the heart of using Excel, and formulas often refer to ranges of cells. How you insert cells into the referenced ...

Discover More

Determining a State from an Area Code

Want to be able to take information that is in one cell and match it to data that is contained in a table within a worksheet? ...

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 eight more than 2?

2015-10-31 14:21:53

mansour

in the this command has a VBA code.
my question is that :
in VBA Code , what is the "appendlast"?
please send your answer with comprehensive illustration.
thank you very much


2015-03-24 23:35:20

Matt

Having the same issue Gary mentioned, is there a solution to this problem. As he stated, much more likely to have range named cells on different sheets and the Apply Names function does not work in this situation.


2014-12-25 12:07:14

Nava

Gary, I recommend using the Find Replace function in lieu of the error you mention. Just tried it and that changed my cell references to Named Ranges. Looks like a bug in the latest 2013 version.


2014-01-16 20:26:49

Gary

This works if the formula is on the same worksheet as the defined names. What though if they are spread around on different sheets in the workbook? This is a much more likely scenario, but then Excel gives an error that Excel cannot find any references to replace.

Example: On Sheet 2, cell A1, type in the number 1. On Sheet 3, cell A1, type in the number 2. On sheet 1, enter the formula "=Sheet2!A1+Sheet3!A1"
The result is the expected value of 3.
Now define names for the cell A1 on sheet 2 and on sheet 3 cells (eg name them as ONE and as TWO). Now, apply these names and Excel fails to find any references to replace.

Is there any known solution to this problem??


2013-10-26 13:37:54

Juan

How great tip, really cool!


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.