MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 6th, 2002, 06:04 PM   #1
viper
Board Regular
 
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
Default

Hi,

Is there a way to prevent one sheet in a workbook from updating when another one does?
What I mean is, I have workbook that contains 12 sheets(one for each month) I use the same formula for pulling the data from the other workbook for each sheet.
What I need is a way for say worksheet 2 to stay the way it is when worksheet 3 is updated. Right now all the sheets contain the same data because they use the same formula. When we are done with sheet 2 and move on to sheet 3 I need for sheet 2 to stay the way it was. I hope I explained this okay.


__________________
I appreciate the help from everyone at Mr. Excel.

viper
viper is offline   Reply With Quote
Old May 6th, 2002, 07:33 PM   #2
brettvba
MrExcel MVP
 
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
Default

What code are you using that would be the dependant on whether you can stop one from updating?

brettvba is offline   Reply With Quote
Old May 6th, 2002, 08:03 PM   #3
Ricky Morris
Board Regular
 
Join Date: Mar 2002
Posts: 363
Default

You would need to convert the formulas in the sheets you don't want to be updated to values. If you want some code that will convert linked formula on a specific sheet to values let me know.
__________________
It's never too late to learn something new.

Ricky
Ricky Morris is offline   Reply With Quote
Old May 6th, 2002, 08:57 PM   #4
Qroozn
Board Regular
 
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
Default


there is no way to set xlcalculation as different in each sheets. and if you have two workbooks open.. they cant be different either. the xlcalculation is derived from the first worksheet opened. all sheets subsequent to that will have the same xlcalculation established.

'just some knowledge for you.
Qroozn is offline   Reply With Quote
Old May 6th, 2002, 09:00 PM   #5
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

When I want to restrict which sheets are updated I change the sheets to manual updates.
This can be done through the Tools...options..Calculation Tab.
This tab allows you to change between auto and manaul updates. Once set to manual you can either manual update all sheets with "F9" or just selected sheet with the "calc sheet" command button.
Nimrod is offline   Reply With Quote
Old May 6th, 2002, 09:04 PM   #6
Qroozn
Board Regular
 
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
Default

NIMROD. I think you have solved it.

instead of us trying to not update one sheet, you worked on updating just the necessary ones.
Qroozn is offline   Reply With Quote
Old May 6th, 2002, 09:05 PM   #7
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

Nimrod is offline   Reply With Quote
Old May 6th, 2002, 10:29 PM   #8
viper
Board Regular
 
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
Default

Thank you for your suggestions.

Ricky, yes I'd like to learn the code.

Nimrod, I'll set my sheets up as you suggested.

thanks again,

__________________
I appreciate the help from everyone at Mr. Excel.

viper
viper is offline   Reply With Quote
Old May 6th, 2002, 11:28 PM   #9
Ricky Morris
Board Regular
 
Join Date: Mar 2002
Posts: 363
Default

Here you go. This should convert the links to values on the sheet from which the macro is executed.

Sub Remove_Links()
Dim x As Integer
Dim wks As Worksheet
Dim lf As Boolean
Dim lfn As Integer
Dim linked_file As String
Dim n As Names
Dim cell As Range
Dim lk As Variant
Dim wbk As Workbook
Dim curr_addr As String
Dim linked_cell As Boolean
Dim LinkedFiles() As Variant
On Error Resume Next
Application.ScreenUpdating = False
If CommandBars(1).Controls("Edit").Controls("Links...").Enabled = False Then
MsgBox "There are no links in this file.", , "Links Not Found"
Exit Sub
End If
For Each lk In ActiveWorkbook.LinkSources(xlExcelLinks)
x = x + 1
ReDim Preserve LinkedFiles(x)
For Each wbk In Workbooks
If wbk.FullName = lk Then
lk = wbk.Name
Exit For
End If
Next wbk
LinkedFiles(x) = lk
Next lk

For x = 1 To UBound(LinkedFiles)
lfn = Len(LinkedFiles(x))
lf = False
For y = lfn To 1 Step -1
If Mid(LinkedFiles(x), y, 1) = "" Then
linked_file = Left(LinkedFiles(x), y) & "["
linked_file = linked_file & Right(LinkedFiles(x), lfn - y)
lf = True
End If
If lf = True Then Exit For
Next y
If lf = False Then
linked_file = LinkedFiles(x)
End If
If WorksheetFunction.IsNumber(WorksheetFunction.Find("'", linked_file)) Then
linked_file = Left(linked_file, WorksheetFunction.Find("'", linked_file)) & "'" & Mid(linked_file, WorksheetFunction.Find("'", linked_file) + 1, 1000)
End If
Err.Clear
curr_addr = ActiveCell.Address
Cells.Find(What:=linked_file).Select
If Err.Number <> 91 Then
Call Select_Range(linked_file)
For Each cell In Selection
Application.StatusBar = "Converting... " & cell.Address
cell.Value = cell.Value
Application.StatusBar = False
Next cell
Range(curr_addr).Select
End If
Next x
Application.StatusBar = False
End Sub

Sub Select_Range(linked_file)
Dim Linked_Cells() As String
Dim Link_Range As Range
Dim x As Integer
On Error Resume Next
Cells.Find(What:=linked_file).Activate
First_Cell = ActiveCell.Address
Do Until Next_Cell = First_Cell
Cells.FindNext(After:=ActiveCell).Activate
If ActiveCell.HasFormula Then
Next_Cell = ActiveCell.Address
ReDim Preserve Linked_Cells(x)
Linked_Cells(x) = Next_Cell
If x = 0 Then
Set Link_Range = Range(Linked_Cells(0))
Else
Set Link_Range = Application.Union(Link_Range, Range(Linked_Cells(x)))
End If
x = x + 1
End If
Loop
Link_Range.Select
End Sub


_________________
It's never too late to learn something new.

Ricky

[ This Message was edited by: Ricky Morris on 2002-05-06 22:31 ]

[ This Message was edited by: Ricky Morris on 2002-05-08 09:20 ]
Ricky Morris is offline   Reply With Quote
Old May 6th, 2002, 11:31 PM   #10
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

I don't understand why you want to remove the links if you may want to update again later ? Why not just disable the update until needed ? See my posting above for details.
Nimrod is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes