Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you
"vezerid" wrote in message oups.com... 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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is there a way I could get excel to run this code automatically, say every
minute? "vezerid" wrote in message oups.com... 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 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you very much, that is fantastic.
"vezerid" wrote in message ps.com... 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 |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for the feedback. Glad to be of help.
Kostis |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
My calc key on Excel changes box to "Text" Box and doesn't calc ? | Charts and Charting in Excel | |||
Open CSV causes calculation in manual calc mode | Excel Discussion (Misc queries) | |||
Pivot Tbl Calc Field using %'s | Excel Discussion (Misc queries) | |||
Calc RSQ and exclude zeros | Excel Worksheet Functions | |||
NPV calc with more than 29 arguements? | Excel Worksheet Functions |