Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Preventing only one cell from recalculating

Is there any way to prevent the worksheet from recalculating only if a
certain cell changes? I have code like below:


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = CELL_ENTER_DATE Then
Application.Calculation = xlManual ...


The problem is Worksheet_Change is called *after* all the formulas are
recalculated on the worksheet. Now, I know I can go to Tools/Options
and change the worksheet's calculation method to Manual, but I don't
want it to be manual. I only want to stop the auto-calc if a certain
cell changes. Does anyone know if that is possible?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Preventing only one cell from recalculating

I don't know - but I think (haven't tested it) you might be able to do this
in reverse; that is, turn calculation to manual and then use the
Worksheet_Change event procedure to run the calculation unless the changed
cell is the one you want.

e.g.:
Sub Worksheet_Change(ByVal Target as Range)
If Not(Target.Address)="A1" Then ActiveSheet.Calculate
End Sub

Just suppose it might be slow if the sheet is too complex
--
- K Dales


"Mike K" wrote:

Is there any way to prevent the worksheet from recalculating only if a
certain cell changes? I have code like below:


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = CELL_ENTER_DATE Then
Application.Calculation = xlManual ...


The problem is Worksheet_Change is called *after* all the formulas are
recalculated on the worksheet. Now, I know I can go to Tools/Options
and change the worksheet's calculation method to Manual, but I don't
want it to be manual. I only want to stop the auto-calc if a certain
cell changes. Does anyone know if that is possible?


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
Stop specific cell from recalculating? Tony Gravagno Excel Worksheet Functions 3 November 16th 07 06:21 PM
please help! Linking a picture to a cell and recalculating automatically [email protected] Excel Discussion (Misc queries) 3 July 1st 06 03:18 PM
cell/range with formula not recalculating suzetter Excel Worksheet Functions 0 July 27th 05 05:09 PM
Recalculating single cell Daniel Bonallack Excel Programming 4 May 11th 05 05:38 PM
Recalculating cell Dennis Allen Excel Programming 6 September 13th 04 08:29 PM


All times are GMT +1. The time now is 04:41 AM.

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

About Us

"It's about Microsoft Excel"