Function call

eros

Board Regular
Joined
May 6, 2011
Messages
90
Does anyone have an idea as to what happens if a function is called in the middle of its calculation?

Is there a way to ensure a previous call is completed first then the second call is executed?

What happens in case of hundreds of calls at the same time? How to regulate all these calls one by one without missing out a single one?

Thanks in advance.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
What do mean exactly? Do you have a snippet of code, or a clear example using formulae? Maybe you're talking about circular references?
 
Upvote 0
No circular reference and no call from within the very same function. It is an Excel sheet which calls the same function from 100s of cells depending on live data streaming from a stocks server.

The code is irrelevant here. What I want to emphasize is calling the same function hundreds of times a second from within different cells. As you would expect in a live stock table.

I trust this clears the air.
 
Upvote 0
How heavy is the sheet? Can Excel calculate all cells within the interval between 2 fresh updates of the stock data?
 
Upvote 0
Your question is exactly what I am trying to understand. What happens in both cases: 1- heavy sheet:no enough time for calculations between sheet updates. 2- light sheet: enough time for updates.

This, I think, is in my hands and mainly governed by how many stocks I would like to follow. If one of these options fail I will have to choose the other. In fact, I would like to follow up as many stocks as possible. Just trying to figure out what happens in each scenario and where the border is. Also if there is a way around to make the sheet as heavy as possible without missing out a single calculation.

Many thanks.
 
Upvote 0
I'm afraid it's a trial and error process for you, to strike the optimal balance. I *think* that Excel will calculate anyway (or try at least), and postpone the treatment of the new data/calculations.
 
Upvote 0
So you mean Excel will skip a new call if the function is busy calculating previous call?

This is what I am afraid of. Any idea how to overcome this and ensure all calls are executed however late?
 
Upvote 0
Not that I know of. Choose the update interval optimally (using trial and error I'm afraid).
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top