Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. 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: Using the Same Range Name on Different Worksheets.

Using the Same Range Name on Different Worksheets

Written by Allen Wyatt (last updated February 4, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


6

One of the handy features of Excel is that you can define names that refer to ranges of cells. (This is a big plus when you want to write formulas that make sense.) When you create a named range, Excel assumes that you want the name to be available from every worksheet within a workbook.

You can, however, specify that a name be valid only for the current worksheet. In this way you can define the same name on different worksheets in your workbook. Thus, you could have a range named MyRange on Sheet1, a range named MyRange on Sheet2, and also on Sheet3. To create names that are only applicable to a specific worksheet, follow these steps:

  1. Select the range of cells that you want to name.
  2. Display the Formulas tab of the ribbon.
  3. Click the Define Name tool in the Defined Names group. Excel displays the New Name dialog box. (See Figure 1.)
  4. Figure 1. The New Name dialog box.

  5. In the Name box, enter a name you want used for this named range.
  6. Using the Scope drop-down list, choose the worksheet on which the range is selected (step 1).
  7. Click on Add.

That's it. Now, if you go to a different worksheet, the name you defined will not be available from that worksheet—only from the worksheet in which it was defined.

There is a potential little quirk here that can lead to some interesting results. Note that in the "Refers To" box, the range shown is fully qualified—it shows the sheet on which you selected cells in step 1. If you select a different sheet in step 5, then your defined name is only available in whatever sheet you specified (in step 5), but it still refers to cells on a sheet other than that one. It will work just fine in your formulas, but it is just one potential "gotcha" you should watch for.

Finally, I should mention that there is a bit of shortcut you could use in the above-listed steps. You could also define the scope for your range name in this manner:

  1. Select the range of cells that you want to name.
  2. Display the Formulas tab of the ribbon.
  3. Click the Define Name tool in the Defined Names group. Excel displays the New Name dialog box.
  4. In the Name box, enter the name of the current worksheet, an exclamation mark, and the name you want to define, as in Sheet1!MyRange.
  5. Click on Add.

This approach—adding the sheet name to the beginning of the range name—results in the scope being set automatically to whatever sheet you specify.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12237) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Using the Same Range Name on Different Worksheets.

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

Anchoring Comment Boxes in Desired Locations

Want your comment boxes to appear someplace other than the right side of a cell? You may be out of luck, and here's why.

Discover More

Switching between a Dialog Box and the Document

Word uses lots of dialog boxes as a way of setting configuration options and gathering information from users. When ...

Discover More

Counting Filtered Rows

The filtering capabilities of Excel are indispensable when working with large sets of data. When you create a filtered ...

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)

Repeating a Pattern when Copying or Filling Cells

The fill tool can be a great help in copying patterns of information in a column. It isn't so great, though, when the ...

Discover More

Dates Copied Incorrectly

Under the right circumstances, you may notice problems when copying dates from one workbook to another. This tip explains ...

Discover More

Getting Rid of Cells Containing Only Spaces

If you have a worksheet that contains a bunch of cells that contain nothing but spaces, you may be looking for a way to ...

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}] (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 4 + 9?

2023-02-06 14:03:06

Mechie

I mentioned the free Add-In from Jan Karel Pieterse called Name Manager in the Excel Tip that J. Woolley references below. (https://jkp-ads.com/excel-name-manager.asp) Another one of its features is the ability to "localize" or "globalize" a Range Name. Very handy. Just one of its many features.


2023-02-04 17:14:33

David Gray

Another useful property of worksheet-scoped names that are scoped to the worksheet in which the referenced cells exist is that when you copy the worksheet, the locally scoped name comes with the copy. In this way, formulas that reference the name refer to the same cells in the new worksheet, very handy for such things as monthly tabulation worksheets.


2023-02-04 16:27:07

Tomek

Further to my earlier comment:
This works well for names with workbook scope. For ranges with sheet scope you would need to precede the range name with <SheetName!>

eg., Range("Sheet1!MyData")

but it would still work.


2023-02-04 16:08:30

Tomek

Range names are a very useful tool, if used properly. I would like to comment on use of the defined names in macros.

If you refer to a named range in a macro, eg., Range("MyData"), and then insert or delete rows, columns etc., which results in the named range to move to different address, the macro will still run correctly.

If, on another hand you refer to a range like Range("B7:H14") and that range gets moved, the macro will still refer to the same address B7:H14. Addresses of ranges or even single cells are not updated when the cells are moved or ranges expanded.


2023-02-04 14:11:47

Philip

Note thaï name scopes are nog supporter in Excel for Mac … (like so Manu otter features of Excel)


2023-02-04 09:59:31

J. Woolley

For related discussion, see https://excelribbon.tips.net/T013007_Checking_the_Scope_of_a_Defined_Name.html


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.