#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Freezing calculation

I have a worksheet where some cells use the values of other cells to
calculate their value. What I would like to be able to do is turn this
calculation on and off based on another cell value. I'd like to be able to
have the cell either calculate a new value based on the other cells or freeze
the calculation and keep its old value even when the linked cell values
change. Ideally, the freeze/unfreeze would be controlled by another cell
value. This is basically a reversible and automatic version of what you can
do by pasting the value of a formula into a cell.

Is there any way to do this?

Thanks,
Dave
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Freezing calculation

You can *sorta* do that, but it'll take a bit of work. Since you can't set
calculation settings by cell, you have to speicfiy which cells you want to
calculate at certain times. First, Under tools-options-calculation, set
calculation to automatic.

Now, right click on the sheet tab of concern, view code, paste this in.

Private Sub Worksheet_Change(ByVal Target As Range)
'Duplicate/modify following line as needed
If Range("A1") = 5 Then Range("B1").Calculate
End Sub


'Modify this macro, adjusting ranges and values to fit your desire.
Depending on the extent of how many cells you have, this should be able to
give the desired outcome.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave Walker" wrote:

I have a worksheet where some cells use the values of other cells to
calculate their value. What I would like to be able to do is turn this
calculation on and off based on another cell value. I'd like to be able to
have the cell either calculate a new value based on the other cells or freeze
the calculation and keep its old value even when the linked cell values
change. Ideally, the freeze/unfreeze would be controlled by another cell
value. This is basically a reversible and automatic version of what you can
do by pasting the value of a formula into a cell.

Is there any way to do this?

Thanks,
Dave

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Freezing calculation

I tried this and found a couple of things. First, I had to set calculation
to "manual" in the options tab. Everything worked as advertised within
single sheets. Where I had a problem was with links between sheets. For
example, if Sheet1!A1 depended on Sheet2!A1 then Sheet1 did not update when
the value on Sheet2 changed. ANy ideas?

Dave

"Luke M" wrote:

You can *sorta* do that, but it'll take a bit of work. Since you can't set
calculation settings by cell, you have to speicfiy which cells you want to
calculate at certain times. First, Under tools-options-calculation, set
calculation to automatic.

Now, right click on the sheet tab of concern, view code, paste this in.

Private Sub Worksheet_Change(ByVal Target As Range)
'Duplicate/modify following line as needed
If Range("A1") = 5 Then Range("B1").Calculate
End Sub


'Modify this macro, adjusting ranges and values to fit your desire.
Depending on the extent of how many cells you have, this should be able to
give the desired outcome.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave Walker" wrote:

I have a worksheet where some cells use the values of other cells to
calculate their value. What I would like to be able to do is turn this
calculation on and off based on another cell value. I'd like to be able to
have the cell either calculate a new value based on the other cells or freeze
the calculation and keep its old value even when the linked cell values
change. Ideally, the freeze/unfreeze would be controlled by another cell
value. This is basically a reversible and automatic version of what you can
do by pasting the value of a formula into a cell.

Is there any way to do this?

Thanks,
Dave

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Freezing calculation

My apologies on the automatic/manual confusion. A case where brain thought
one thing, fingers typed another. For intersheet relations:

Placing the code on the Sheet2 that has precedent value, you can modify
coding to:

Private Sub Worksheet_Change(ByVal Target As Range)
'Duplicate/modify following line as needed
If Range("A1") = 5 Then Sheets("Sheet1").Range("A1").Calculate
End Sub


'So, you would place this within the sheet2 module. Then, when Sheet2!A1 =
5, the macro will calculate A1 on Sheet1.



--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave Walker" wrote:

I tried this and found a couple of things. First, I had to set calculation
to "manual" in the options tab. Everything worked as advertised within
single sheets. Where I had a problem was with links between sheets. For
example, if Sheet1!A1 depended on Sheet2!A1 then Sheet1 did not update when
the value on Sheet2 changed. ANy ideas?

Dave

"Luke M" wrote:

You can *sorta* do that, but it'll take a bit of work. Since you can't set
calculation settings by cell, you have to speicfiy which cells you want to
calculate at certain times. First, Under tools-options-calculation, set
calculation to automatic.

Now, right click on the sheet tab of concern, view code, paste this in.

Private Sub Worksheet_Change(ByVal Target As Range)
'Duplicate/modify following line as needed
If Range("A1") = 5 Then Range("B1").Calculate
End Sub


'Modify this macro, adjusting ranges and values to fit your desire.
Depending on the extent of how many cells you have, this should be able to
give the desired outcome.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave Walker" wrote:

I have a worksheet where some cells use the values of other cells to
calculate their value. What I would like to be able to do is turn this
calculation on and off based on another cell value. I'd like to be able to
have the cell either calculate a new value based on the other cells or freeze
the calculation and keep its old value even when the linked cell values
change. Ideally, the freeze/unfreeze would be controlled by another cell
value. This is basically a reversible and automatic version of what you can
do by pasting the value of a formula into a cell.

Is there any way to do this?

Thanks,
Dave

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Freezing calculation

It works! Thanks for the help.

Dave

"Luke M" wrote:

My apologies on the automatic/manual confusion. A case where brain thought
one thing, fingers typed another. For intersheet relations:

Placing the code on the Sheet2 that has precedent value, you can modify
coding to:

Private Sub Worksheet_Change(ByVal Target As Range)
'Duplicate/modify following line as needed
If Range("A1") = 5 Then Sheets("Sheet1").Range("A1").Calculate
End Sub


'So, you would place this within the sheet2 module. Then, when Sheet2!A1 =
5, the macro will calculate A1 on Sheet1.



--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave Walker" wrote:

I tried this and found a couple of things. First, I had to set calculation
to "manual" in the options tab. Everything worked as advertised within
single sheets. Where I had a problem was with links between sheets. For
example, if Sheet1!A1 depended on Sheet2!A1 then Sheet1 did not update when
the value on Sheet2 changed. ANy ideas?

Dave

"Luke M" wrote:

You can *sorta* do that, but it'll take a bit of work. Since you can't set
calculation settings by cell, you have to speicfiy which cells you want to
calculate at certain times. First, Under tools-options-calculation, set
calculation to automatic.

Now, right click on the sheet tab of concern, view code, paste this in.

Private Sub Worksheet_Change(ByVal Target As Range)
'Duplicate/modify following line as needed
If Range("A1") = 5 Then Range("B1").Calculate
End Sub


'Modify this macro, adjusting ranges and values to fit your desire.
Depending on the extent of how many cells you have, this should be able to
give the desired outcome.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave Walker" wrote:

I have a worksheet where some cells use the values of other cells to
calculate their value. What I would like to be able to do is turn this
calculation on and off based on another cell value. I'd like to be able to
have the cell either calculate a new value based on the other cells or freeze
the calculation and keep its old value even when the linked cell values
change. Ideally, the freeze/unfreeze would be controlled by another cell
value. This is basically a reversible and automatic version of what you can
do by pasting the value of a formula into a cell.

Is there any way to do this?

Thanks,
Dave

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
Freezing a row Heidi Excel Worksheet Functions 3 July 8th 09 11:51 PM
freezing panes stew Excel Discussion (Misc queries) 3 September 21st 08 09:55 AM
Freezing Old_skills_lost[_2_] New Users to Excel 5 January 16th 08 01:05 AM
freezing a row Seren Setting up and Configuration of Excel 2 November 30th 05 02:35 PM
why does my screen keep freezing up on me simplyred007 Excel Discussion (Misc queries) 1 November 7th 05 04:57 PM


All times are GMT +1. The time now is 12:05 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"