+ Reply to Thread
Results 1 to 6 of 6

How to rename a sheets without getting #ref?

  1. #1
    Registered User
    Join Date
    08-31-2010
    Location
    rete
    MS-Off Ver
    Excel 2003
    Posts
    2

    How to rename a sheets without getting #ref?

    I have 3 sheets:

    old
    new
    contains-refs-to-old

    How can I place "new" in place of "old" without getting #REF! errors on the 3rd table?

    thx.

  2. #2
    Registered User
    Join Date
    07-01-2010
    Location
    High Wycombe
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to rename a sheets without getting #ref?

    what you need to do is adjust the formulas because it is looking for the current sheet that you have changed but cannot find the name.

    The easiest way I believe to change the sheet name then change all of formulas by select all the cells with #REF & use Ctrl + H. Type in the old name into the find what box, and the new name into the replace all box, then hit replace all.

    This should sort of all of the #Ref

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How to rename a sheets without getting #ref?

    Similar...

    You can do a find...replace on the sheet with the formula replacing = with ## and then rename your sheets and reverse the find...replace.

    This is also useful for moving formula around without relative references altering.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to rename a sheets without getting #ref?

    How are you changing the sheet name?

    If you double-click the tab and type the new name there the formulae should update accordingly on all sheets, (unless you are using indirect refs, these will need to be changed manually).
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How to rename a sheets without getting #ref?

    Quote Originally Posted by Marcol View Post
    How are you changing the sheet name?

    If you double-click the tab and type the new name there the formulae should update accordingly on all sheets, (unless you are using indirect refs, these will need to be changed manually).
    I'm guessing it's something like changing Old to Very Old and New to Old in which case the formula would still point to Very Old. Just my guess...

    Dom

  6. #6
    Registered User
    Join Date
    08-31-2010
    Location
    rete
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: How to rename a sheets without getting #ref?

    So first I had to do a find&replace in the "contains-refs" sheet , and replace every "old" with "new".
    Then delete the sheet "old", and rename sheet "new" to "old", references will change to the new name upon renaming.

    If I delete the sheet "old" first, there are more "#REF!" errors than references to the "old" sheet because of cells referencing to an other bad referenced cell.


    Thank you very much guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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