Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Deleting worksheet breaks my formulas

I have a spreadsheet with a number of tabs. The first tab is my "totals"
where there are formulas to total certain cells in each of the other tabs.

Each week I send the workbook out to a number of individuals asking them to
update the tab with their name. When I receive their replies, I delete their
old tab and copy in their new tab.

This breaks my formulas in the totals tab, even though the copied in
sheets's tabs have the same names.

Is there any way I can keep excel from tracking whether or not the tabs are
there until I am ready to calculate the totals? I already set them to manual
calculation.

Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Deleting worksheet breaks my formulas

Before you delete the old sheet and copy in the new sheet, select your "totals" sheet and run this
macro:

Sub SAFormulaToText()
Dim myCell As Range
Dim myCalc As Variant

With Application
.ScreenUpdating = False
myCalc = .Calculation
.Calculation = xlCalculationManual
.EnableEvents = False
End With

On Error Resume Next

For Each myCell In ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormu las)
myCell.Formula = "'" & myCell.Formula
Next myCell

With Application
.ScreenUpdating = True
.Calculation = myCalc
.EnableEvents = True
End With
End Sub

Then remove the old sheet, copy in the new sheet, and then select all the cells that should have
formulas on your "Total" sheet and run this macro:

Sub SATextToFormula()
Dim myCell As Range
Dim myCalc As Variant

With Application
.ScreenUpdating = False
myCalc = .Calculation
.Calculation = xlCalculationManual
.EnableEvents = False
End With

On Error Resume Next

For Each myCell In Selection
myCell.Formula = myCell.Text
Next myCell

With Application
.ScreenUpdating = True
.Calculation = myCalc
.EnableEvents = True
End With
End Sub


HTH,
Bernie
MS Excel MVP


"luv2jeep" wrote in message
...
I have a spreadsheet with a number of tabs. The first tab is my "totals"
where there are formulas to total certain cells in each of the other tabs.

Each week I send the workbook out to a number of individuals asking them to
update the tab with their name. When I receive their replies, I delete their
old tab and copy in their new tab.

This breaks my formulas in the totals tab, even though the copied in
sheets's tabs have the same names.

Is there any way I can keep excel from tracking whether or not the tabs are
there until I am ready to calculate the totals? I already set them to manual
calculation.

Any help would be greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Deleting worksheet breaks my formulas

as long as it is exactly the same name, try
the indirect function
=indirect("'sheet name'!cell")

"luv2jeep" wrote:

I have a spreadsheet with a number of tabs. The first tab is my "totals"
where there are formulas to total certain cells in each of the other tabs.

Each week I send the workbook out to a number of individuals asking them to
update the tab with their name. When I receive their replies, I delete their
old tab and copy in their new tab.

This breaks my formulas in the totals tab, even though the copied in
sheets's tabs have the same names.

Is there any way I can keep excel from tracking whether or not the tabs are
there until I am ready to calculate the totals? I already set them to manual
calculation.

Any help would be greatly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Deleting worksheet breaks my formulas

Instead of deleting the old worksheet, why not just copy the cells and paste
them into the worksheet that has that same name.

luv2jeep wrote:

I have a spreadsheet with a number of tabs. The first tab is my "totals"
where there are formulas to total certain cells in each of the other tabs.

Each week I send the workbook out to a number of individuals asking them to
update the tab with their name. When I receive their replies, I delete their
old tab and copy in their new tab.

This breaks my formulas in the totals tab, even though the copied in
sheets's tabs have the same names.

Is there any way I can keep excel from tracking whether or not the tabs are
there until I am ready to calculate the totals? I already set them to manual
calculation.

Any help would be greatly appreciated.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a worksheet but retaining values from the worksheet. [email protected] Excel Discussion (Misc queries) 1 September 13th 06 03:48 PM
Deleting Page Breaks syssupspe Excel Discussion (Misc queries) 1 May 8th 06 11:47 PM
deleting values in a worksheet without deleting the formulas patti Excel Worksheet Functions 1 October 28th 05 10:49 PM
Excel is Deleting My Formulas?? Carl Bowman Excel Discussion (Misc queries) 2 August 29th 05 10:56 PM
don't show the page breaks on the worksheet Classic Excel Discussion (Misc queries) 2 December 7th 04 02:16 AM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"