PC Review


Reply
Thread Tools Rate Thread

Application.Calculate

 
 
=?Utf-8?B?QWxleCBTdC1QaWVycmU=?=
Guest
Posts: n/a
 
      4th Oct 2007
Hi!
I have an excel file that calculate 10 000 simulations. For each simulation,
I use the Application.Calculate (takes 3 seconds) to refresh the result.
Thereafter, I copy the interesting result inside a cell and I do it for all
simulations. The problem I have is that Application.Calculate doesn't refresh
all the workbook. File= 130 mo.
Is there anything else I can write to ensure all calculations have been done?
Thank you!
Alex
--
Alex St-Pierre
 
Reply With Quote
 
 
 
 
JP
Guest
Posts: n/a
 
      4th Oct 2007
Hi,
Are you using "application.volatile = false"?

Does the status bar say "Calculate" even after you do a manual
calculation?



On Oct 4, 2:49 pm, Alex St-Pierre
<AlexStPie...@discussions.microsoft.com> wrote:
> Hi!
> I have an excel file that calculate 10 000 simulations. For each simulation,
> I use the Application.Calculate (takes 3 seconds) to refresh the result.
> Thereafter, I copy the interesting result inside a cell and I do it for all
> simulations. The problem I have is that Application.Calculate doesn't refresh
> all the workbook. File= 130 mo.
> Is there anything else I can write to ensure all calculations have been done?
> Thank you!
> Alex
> --
> Alex St-Pierre



 
Reply With Quote
 
=?Utf-8?B?QWxleCBTdC1QaWVycmU=?=
Guest
Posts: n/a
 
      4th Oct 2007
Hi!
>Are you using "application.volatile = false"?

I don't know this function
>Does the status bar say "Calculate" even after you do a manual
>calculation?

It takes 3 seconds to calculate as when I do an "Application.Calculate".
When this is done, the status bar indicate doesn't indicate calculate..
Sometimes, I do a F9 and even after the calculation, the results have changed
but the data is not correct. Then, if I go in the cell that make the
"=average(C2:M1000)" and edit the function, the value is changing when I
press Enter.. This happens not often but should not happens. I don't know if
there's a way to be sure all calculations are done in VBA?
Thanks a lot!
Alex
--
Alex St-Pierre


"JP" wrote:

> Hi,
> Are you using "application.volatile = false"?
>
> Does the status bar say "Calculate" even after you do a manual
> calculation?
>
>
>
> On Oct 4, 2:49 pm, Alex St-Pierre
> <AlexStPie...@discussions.microsoft.com> wrote:
> > Hi!
> > I have an excel file that calculate 10 000 simulations. For each simulation,
> > I use the Application.Calculate (takes 3 seconds) to refresh the result.
> > Thereafter, I copy the interesting result inside a cell and I do it for all
> > simulations. The problem I have is that Application.Calculate doesn't refresh
> > all the workbook. File= 130 mo.
> > Is there anything else I can write to ensure all calculations have been done?
> > Thank you!
> > Alex
> > --
> > Alex St-Pierre

>
>
>

 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      4th Oct 2007
Alex,
You could try "Application.CalculateFull" in your routine, that will
force a full calculation of all the data in all open workbooks. But it
sounds like Excel is having trouble keeping track of all your
formulas, you might want to try some ways to make your data more
compact so Excel isn't working so hard.

Hope this helps,
JP


On Oct 4, 6:25 pm, Alex St-Pierre
<AlexStPie...@discussions.microsoft.com> wrote:
> Hi!>Are you using "application.volatile = false"?
>
> I don't know this function>Does the status bar say "Calculate" even after you do a manual
> >calculation?

>
> It takes 3 seconds to calculate as when I do an "Application.Calculate".
> When this is done, the status bar indicate doesn't indicate calculate..
> Sometimes, I do a F9 and even after the calculation, the results have changed
> but the data is not correct. Then, if I go in the cell that make the
> "=average(C2:M1000)" and edit the function, the value is changing when I
> press Enter.. This happens not often but should not happens. I don't know if
> there's a way to be sure all calculations are done in VBA?
> Thanks a lot!
> Alex
> --
> Alex St-Pierre
>
>


 
Reply With Quote
 
=?Utf-8?B?QWxleCBTdC1QaWVycmU=?=
Guest
Posts: n/a
 
      5th Oct 2007
Yeah.. The problem is the calculation are so complex. There's no equation..
we must find the solution using simulation. Is there a way to make a break
between each record or a wait .. I'll try it.
Thanks!
Alex
--
Alex St-Pierre


"JP" wrote:

> Alex,
> You could try "Application.CalculateFull" in your routine, that will
> force a full calculation of all the data in all open workbooks. But it
> sounds like Excel is having trouble keeping track of all your
> formulas, you might want to try some ways to make your data more
> compact so Excel isn't working so hard.
>
> Hope this helps,
> JP
>
>
> On Oct 4, 6:25 pm, Alex St-Pierre
> <AlexStPie...@discussions.microsoft.com> wrote:
> > Hi!>Are you using "application.volatile = false"?
> >
> > I don't know this function>Does the status bar say "Calculate" even after you do a manual
> > >calculation?

> >
> > It takes 3 seconds to calculate as when I do an "Application.Calculate".
> > When this is done, the status bar indicate doesn't indicate calculate..
> > Sometimes, I do a F9 and even after the calculation, the results have changed
> > but the data is not correct. Then, if I go in the cell that make the
> > "=average(C2:M1000)" and edit the function, the value is changing when I
> > press Enter.. This happens not often but should not happens. I don't know if
> > there's a way to be sure all calculations are done in VBA?
> > Thanks a lot!
> > Alex
> > --
> > Alex St-Pierre
> >
> >

>
>

 
Reply With Quote
 
=?Utf-8?B?QWxleCBTdC1QaWVycmU=?=
Guest
Posts: n/a
 
      5th Oct 2007
I tried a wait but the problem is that there's no excel calculation during
that time.. I would like to let excel calculate but the wait seems to stop
the excel calculation... Any idea?
Thanks!
Alex
--
Alex St-Pierre


"JP" wrote:

> Alex,
> You could try "Application.CalculateFull" in your routine, that will
> force a full calculation of all the data in all open workbooks. But it
> sounds like Excel is having trouble keeping track of all your
> formulas, you might want to try some ways to make your data more
> compact so Excel isn't working so hard.
>
> Hope this helps,
> JP
>
>
> On Oct 4, 6:25 pm, Alex St-Pierre
> <AlexStPie...@discussions.microsoft.com> wrote:
> > Hi!>Are you using "application.volatile = false"?
> >
> > I don't know this function>Does the status bar say "Calculate" even after you do a manual
> > >calculation?

> >
> > It takes 3 seconds to calculate as when I do an "Application.Calculate".
> > When this is done, the status bar indicate doesn't indicate calculate..
> > Sometimes, I do a F9 and even after the calculation, the results have changed
> > but the data is not correct. Then, if I go in the cell that make the
> > "=average(C2:M1000)" and edit the function, the value is changing when I
> > press Enter.. This happens not often but should not happens. I don't know if
> > there's a way to be sure all calculations are done in VBA?
> > Thanks a lot!
> > Alex
> > --
> > Alex St-Pierre
> >
> >

>
>

 
Reply With Quote
 
=?Utf-8?B?QWxleCBTdC1QaWVycmU=?=
Guest
Posts: n/a
 
      5th Oct 2007
>Does the status bar say "Calculate" even after you do a manual
calculation?
Yes,.. it's always written Calculate... (the calculation are set to manual)
--
Alex St-Pierre


"JP" wrote:

> Hi,
> Are you using "application.volatile = false"?
>
> Does the status bar say "Calculate" even after you do a manual
> calculation?
>
>
>
> On Oct 4, 2:49 pm, Alex St-Pierre
> <AlexStPie...@discussions.microsoft.com> wrote:
> > Hi!
> > I have an excel file that calculate 10 000 simulations. For each simulation,
> > I use the Application.Calculate (takes 3 seconds) to refresh the result.
> > Thereafter, I copy the interesting result inside a cell and I do it for all
> > simulations. The problem I have is that Application.Calculate doesn't refresh
> > all the workbook. File= 130 mo.
> > Is there anything else I can write to ensure all calculations have been done?
> > Thank you!
> > Alex
> > --
> > Alex St-Pierre

>
>
>

 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      5th Oct 2007
Maybe if you posted the code or the formulas you are using and/or some
more detail about what exactly you are doing, we could be of more
assistance.

--JP

On Oct 4, 8:04 pm, Alex St-Pierre
<AlexStPie...@discussions.microsoft.com> wrote:
> I tried a wait but the problem is that there's no excel calculation during
> that time.. I would like to let excel calculate but the wait seems to stop
> the excel calculation... Any idea?
> Thanks!
> Alex
> --
> Alex St-Pierre
>



 
Reply With Quote
 
Niek Otten
Guest
Posts: n/a
 
      5th Oct 2007
Hi Alex,

You could try to rebuild the dependency tree with CTRL+ALT+SHIFT+F9.

For lots of information about calculations in Excel, visit Charles William's site:


www.decisionmodels.com

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Alex St-Pierre" <(E-Mail Removed)> wrote in message
news:921B5B74-3EC2-479B-863E-(E-Mail Removed)...
| Hi!
| >Are you using "application.volatile = false"?
| I don't know this function
| >Does the status bar say "Calculate" even after you do a manual
| >calculation?
| It takes 3 seconds to calculate as when I do an "Application.Calculate".
| When this is done, the status bar indicate doesn't indicate calculate..
| Sometimes, I do a F9 and even after the calculation, the results have changed
| but the data is not correct. Then, if I go in the cell that make the
| "=average(C2:M1000)" and edit the function, the value is changing when I
| press Enter.. This happens not often but should not happens. I don't know if
| there's a way to be sure all calculations are done in VBA?
| Thanks a lot!
| Alex
| --
| Alex St-Pierre
|
|
| "JP" wrote:
|
| > Hi,
| > Are you using "application.volatile = false"?
| >
| > Does the status bar say "Calculate" even after you do a manual
| > calculation?
| >
| >
| >
| > On Oct 4, 2:49 pm, Alex St-Pierre
| > <AlexStPie...@discussions.microsoft.com> wrote:
| > > Hi!
| > > I have an excel file that calculate 10 000 simulations. For each simulation,
| > > I use the Application.Calculate (takes 3 seconds) to refresh the result.
| > > Thereafter, I copy the interesting result inside a cell and I do it for all
| > > simulations. The problem I have is that Application.Calculate doesn't refresh
| > > all the workbook. File= 130 mo.
| > > Is there anything else I can write to ensure all calculations have been done?
| > > Thank you!
| > > Alex
| > > --
| > > Alex St-Pierre
| >
| >
| >


 
Reply With Quote
 
=?Utf-8?B?SlJGb3Jt?=
Guest
Posts: n/a
 
      5th Oct 2007
Alex St-Pierre,

I agree with JP - can you post the code you are using. It sounds like a lot
of variables are in the spreadsheet. Do the calculations work when you do a
manual update?

"Alex St-Pierre" wrote:

> Hi!
> I have an excel file that calculate 10 000 simulations. For each simulation,
> I use the Application.Calculate (takes 3 seconds) to refresh the result.
> Thereafter, I copy the interesting result inside a cell and I do it for all
> simulations. The problem I have is that Application.Calculate doesn't refresh
> all the workbook. File= 130 mo.
> Is there anything else I can write to ensure all calculations have been done?
> Thank you!
> Alex
> --
> Alex St-Pierre

 
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
calculate time to complete application genoki@yahoo.com Microsoft Access VBA Modules 8 22nd Jul 2008 07:54 PM
Application.calculate not working JT Microsoft Excel Programming 1 8th Jul 2008 06:33 PM
Application.Calculate vs. F9 =?Utf-8?B?TURX?= Microsoft Excel Programming 6 28th Jul 2006 08:30 PM
Re: Application.Calculate & VLOOKUP Tom Ogilvy Microsoft Excel Programming 0 14th Apr 2005 01:17 PM
Re: Application.Calculate & VLOOKUP Fredrik Wahlgren Microsoft Excel Programming 2 14th Apr 2005 11:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:43 AM.