+ Reply to Thread
Results 1 to 3 of 3

Recovering link to deleted worksheet when worksheet reinstated

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    9

    Recovering link to deleted worksheet when worksheet reinstated

    I have a workbook with a worksheet for each month of the year. The worksheets are identical apart from their title, which is just the name of the month. There is a thirteenth workbook which is a summary of the year. It contains formulae with references to the month worksheets, simple stuff like 'January!AC23'. Sometimes the design of the month worksheet needs to change. To do this, I delete all months but January, make the required changes to January, then run a macro which creates the other months of the year by copying and renaming January. The problem is that deleting a worksheet causes the #REF! error on the year summary worksheet, and recreating the month worksheets does not get the formulae working again. I know I can get around this by using INDIRECT and storing the names of the months in the summary worksheet, but is there another way?

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Recovering link to deleted worksheet when worksheet reinstated

    I suppose you could use the find and replace to change all the cell formulas to something else so you don't get a REF error and then change them all back afterwards. Or if there are no other REF errors on the sheet you could delete and copy the sheets one at a time and then replace #REF with the month name for each one.

    If you go with the first method either turn displayalerts off or create 12 hidden sheets to change the references to, otherwise you get the missing link/update values box for every cell.

  3. #3
    Registered User
    Join Date
    05-24-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Recovering link to deleted worksheet when worksheet reinstated

    Thanks, I'd considered that, but it's complicated. I should explain: I'm tidying up at the end of a contract and I'm concerned that the work I've done should be easy to maintain by people who have no more than a nodding acquaintance with Excel. If I put in a literal cell reference to the year summary sheet, it's beautifully simple and anyone can understand it: January!AC6. That formula is copiable downwards, so the cell below is: January!AC7. Lovely and obvious. But To make it work when the month worksheets are deleted then replaced, I used INDIRECT, so the formula becomes:

    =INDIRECT(B$4&"!ac" &ROW())

    ..which I'm afraid is going to scare and confuse people.

+ 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