+ Reply to Thread
Results 1 to 2 of 2

change cell names based on new sheet name

  1. #1
    Registered User
    Join Date
    05-22-2006
    Posts
    5

    change cell names based on new sheet name

    I have a workbook that I frequently need to add new sheets using a template. I would like the template to included named cells. Is there a way to add copy the template and change the named cells to include the new sheet name? For instance:

    If I have a sheet named Template with several named cells, one being TemplateSalaryTotal. When I copy the "Template" sheet to create a "NewSheet" I would like to change the name of all the named cells to begin with "NewSheet" rather than "Template".

    Is this possible?

    Thank you!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: change cell names based on new sheet name

    If you create sheet-level names, instead of workbook-level names, then each name will be unique to the sheet that contains it.
    Which version of Excel are you using?
    If Excel 2007 or above...here's how you create a sheet-level name:
    • Formulas.Define_Name
    ...Name: (enter any valid name here)
    ...Scope: (select the sheet that the named cell is on)
    ...Refers to: (select the cell to be named)
    ...Click: OK

    Example:
    Cell C3 on Sheet1 is named rngTaxRate.
    Enter 5% in that cell
    Create a copy of Sheet1....Which will be Sheet1 (2)
    Enter 10% in the copy

    This formula on Sheet1 (2) returns: 10%
    =rngTaxRate

    However, THIS formula returns: 5%
    =Sheet1!rngTaxRate

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change sheet tab names by changing cell value
    By Beeblebrox in forum Excel General
    Replies: 4
    Last Post: 06-19-2015, 08:28 AM
  2. Change sheet names by dates, not cell value
    By roachiepie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2012, 04:42 PM
  3. Changing Sheet Names based on a Cell Reference
    By tjloggia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-04-2012, 04:35 PM
  4. Automatically change Sheet names by typing in a cell
    By BLRITCHIE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2010, 04:19 AM
  5. How to change XL sheet names from cell range
    By Bila in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-11-2005, 11:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1