+ Reply to Thread
Results 1 to 4 of 4

GURUS! Can we suspend automatic renaming of tables and ranges when replacing sheets???

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    GURUS! Can we suspend automatic renaming of tables and ranges when replacing sheets???

    Good Morning Everyone!

    I have a major headache.

    I have a workbook project with many references to a named sheet. And on that sheet, many references to named ranges and tables.

    Periodically new information is published in the form of a worksheet.

    I created a sub that would (and you more experienced folk already see it coming) rename the original worksheet to an archive sheet, rename the table and ranges (I simply put a sequential count after the original names just for future reference if need be), then:

    Copy the sheet with the new information to this workbook and give it the original sheet name
    Create the main table and name it the original table name
    Name all ranges

    In all instances above I name the items (sheet, table and ranges) the original names, so when I archive the sheet that was named "Directory" it becomes "Directory01" and the new worksheet gets named "Directory". The table "tblMain" that was on Sheets.("Directory") which became sheets.("Directory01") is renamed to tblMain01...

    And the problem I face is that Excel in it's honestly incredible ways replaces ALL the references throughout my workbook to the archived names in order to keep the links valid before I get to create the new names.

    I want to somehow suspend the renaming Excel is doing until I have the new sheet, table and ranges set up with the original names so all references throughout the workbook are pointing to the new information.

    I am hoping (wishing, not jumping around) that there is a simple software switch, but preparing for the worst.

    Thank-you VERY much.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: GURUS! Can we suspend automatic renaming of tables and ranges when replacing sheets???

    Maybe you could make use of the INDIRECT function which allows you to build up a reference as a text string and so is insulated from automatic changes.

    See Excel help for details.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: GURUS! Can we suspend automatic renaming of tables and ranges when replacing sheets???

    Maybe make the referenced sheet a separate workbook. With the referring workbook CLOSED, you could rename and replace it at will.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    Re: GURUS! Can we suspend automatic renaming of tables and ranges when replacing sheets???

    Would of NEVER thought of either - looking forward to trying them out! But for right now, my head hurts...

+ 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. Calling all gurus: Automatic waypoint numbers from cell colors!
    By Scott_Dreppan in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-07-2013, 03:54 AM
  2. Automatic indexing with renaming of sheeets
    By Mearsy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2012, 11:07 AM
  3. Modify script to name ranges when importing tables from MS Word - for the VBA gurus
    By adrianodl in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-21-2012, 12:45 PM
  4. [SOLVED] Systematically Renaming Ranges
    By MWS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2006, 11:15 AM
  5. Automatic replacing a file while in a macro
    By JasperBlaas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2005, 11:05 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