PC Review


Reply
 
 
PH NEWS
Guest
Posts: n/a
 
      21st Sep 2006
Hi all,

I have a spreadsheet with about 20 columns of data, 3 of which are
long-winded array formulas. I have some conditional formats and simple IF
functions in the other 17 columns. I would like to keep the sheet calc to
auto, but this makes entry slow because of the 3 columns of arrays. Is there
a way to exclude the array columns so I can keep the auto calc?

Thanks in advance,

SPL


 
Reply With Quote
 
 
 
 
vezerid
Guest
Posts: n/a
 
      21st Sep 2006
VBA can calculate just a single range. Something like:

Sub CalcRange
Sheets("Data").Range("E:F").Calculate
End Sub

You can have calculation option to Manual and use a button to call this
procedure.

HTH
Kostis Vezerides

 
Reply With Quote
 
PH NEWS
Guest
Posts: n/a
 
      22nd Sep 2006
Thank you
"vezerid" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> VBA can calculate just a single range. Something like:
>
> Sub CalcRange
> Sheets("Data").Range("E:F").Calculate
> End Sub
>
> You can have calculation option to Manual and use a button to call this
> procedure.
>
> HTH
> Kostis Vezerides
>



 
Reply With Quote
 
PH NEWS
Guest
Posts: n/a
 
      22nd Sep 2006
Is there a way I could get excel to run this code automatically, say every
minute?
"vezerid" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> VBA can calculate just a single range. Something like:
>
> Sub CalcRange
> Sheets("Data").Range("E:F").Calculate
> End Sub
>
> You can have calculation option to Manual and use a button to call this
> procedure.
>
> HTH
> Kostis Vezerides
>



 
Reply With Quote
 
vezerid
Guest
Posts: n/a
 
      22nd Sep 2006
Yes, you can use the Application.OnTime method. I am providing the full
set of subs that you need. You will need a global variable to remember
the next time a calculation is scheduled, so that you can stop periodic
calculation:

Public NextSchedule As Date

Sub CalcRange()
Sheets("Data").Range("E:F").Calculate
End Sub

Sub StartPeriodicCalculation()
Call CalcRange
NextSchedule = Now + TimeValue("00:01:00")
Application.OnTime NextSchedule, "StartPeriodicCalculation"
End Sub

Sub StopPeriodicCalculation()
Application.OnTime NextSchedule, "StartPeriodicCalculation", , False
End Sub

You call Start once. It will take care of subsequent schedules. Then
you call Stop when you are done. In fact, it might be a better idea if
you place the body of Stop in Workbook_BeforeClose, so that it is
guaranteed to work even if you forget to call Stop explicitly.

Beware, I have used OnTime in the past, even though I tried ways of
ensuring that the scheduling stops, sometimes the cancellation did not
work. The result was that Excel was restarting to execute the scheduled
subs.

HTH
Kostis Vezerides

 
Reply With Quote
 
PH NEWS
Guest
Posts: n/a
 
      22nd Sep 2006
Thank you very much, that is fantastic.
"vezerid" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Yes, you can use the Application.OnTime method. I am providing the full
> set of subs that you need. You will need a global variable to remember
> the next time a calculation is scheduled, so that you can stop periodic
> calculation:
>
> Public NextSchedule As Date
>
> Sub CalcRange()
> Sheets("Data").Range("E:F").Calculate
> End Sub
>
> Sub StartPeriodicCalculation()
> Call CalcRange
> NextSchedule = Now + TimeValue("00:01:00")
> Application.OnTime NextSchedule, "StartPeriodicCalculation"
> End Sub
>
> Sub StopPeriodicCalculation()
> Application.OnTime NextSchedule, "StartPeriodicCalculation", , False
> End Sub
>
> You call Start once. It will take care of subsequent schedules. Then
> you call Stop when you are done. In fact, it might be a better idea if
> you place the body of Stop in Workbook_BeforeClose, so that it is
> guaranteed to work even if you forget to call Stop explicitly.
>
> Beware, I have used OnTime in the past, even though I tried ways of
> ensuring that the scheduling stops, sometimes the cancellation did not
> work. The result was that Excel was restarting to execute the scheduled
> subs.
>
> HTH
> Kostis Vezerides
>



 
Reply With Quote
 
vezerid
Guest
Posts: n/a
 
      22nd Sep 2006
Thanks for the feedback. Glad to be of help.

Kostis

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calc = Manual & Do Not Calc b/4 SAVE =?Utf-8?B?S2Vu?= Microsoft Excel Misc 0 3rd Oct 2007 02:28 PM
Manual calc for one sheet, auto calc for another Hall Microsoft Excel Discussion 1 17th Apr 2007 03:52 AM
auto calc on, but have to edit (f2) cells to force re-calc..help! =?Utf-8?B?Q3VydA==?= Microsoft Excel Worksheet Functions 3 13th Feb 2006 06:05 PM
Spreadsheet changes from auto calc to manual calc - HELP! =?Utf-8?B?VGVpamE=?= Microsoft Excel Worksheet Functions 2 19th Aug 2004 11:34 PM
Re: Pivot Tables: Calc Items vs. Calc Fields Lady Layla Microsoft Excel Misc 2 10th May 2004 01:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:05 PM.