Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Application.Calculate

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Application.Calculate

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
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Application.Calculate

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
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Application.Calculate

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
wrote:
Hi!Are you using "application.volatile = false"?

I don't know this functionDoes 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Application.Calculate

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
wrote:
Hi!Are you using "application.volatile = false"?

I don't know this functionDoes 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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Application.Calculate

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
wrote:
Hi!Are you using "application.volatile = false"?

I don't know this functionDoes 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




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Application.Calculate

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
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




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Application.Calculate

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
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



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Application.Calculate

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" wrote in message
...
| 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
| 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
|
|
|


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Application.Calculate

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
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
Run-time error '1004' at "Application.Calculate" PCLIVE Excel Programming 2 March 2nd 07 04:32 PM
Application.Calculate vs. F9 MDW Excel Programming 6 July 28th 06 08:30 PM
Application.Calculate & VLOOKUP Tom Ogilvy Excel Programming 0 April 14th 05 01:17 PM
Application.Calculate & VLOOKUP Fredrik Wahlgren Excel Programming 2 April 14th 05 11:51 AM
"Application.Calculate" does not always update/recalculate the for John K Excel Programming 1 January 20th 05 06:27 PM


All times are GMT +1. The time now is 01:49 PM.

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"