XL Calc Sequence - To Charles and ROb

  • Thread starter Thread starter Alex Lai
  • Start date Start date
A

Alex Lai

Hi Charles and ROb,

Thanks for your emails. My situation is simpler:
there are only 6 cells in the same worksheet: A1, A2, A3, B1, B2, B3
A1 has a value of 1
A2 has a value of 2
A3 = A1 + A2

B1 = A1+ 2
B2 has a value of 2
B3= B1+B2

Now I want to determine, by vba, in which order XL calcs: A3 first or B1
first?


Thanks,
Alex.
 
I *think* Stephen Bullen once told me that it calculates across, then down,
unless the formulas dictate a different order. If that's correct, B1 would be
calculated first.

But my question for you is, WHY do you want/need to know this???
 
PS: I don't think there's any way to determine this from a VBA macro.
 
There is no event to capture which cell is calculating.
My reply to your first post was to include a dummy UDF within the formula,
one which returns 0.
The dummy UDF just outputs to the immediate window the address of the cell
which is currently calculating.
 
Its not possible to prevent Excel passing uncalculated/empty cells to
functions: you have to handle this in the function itself:
for examples of how to do this see
http://www.DecisionModels.com/calcsecretsj.htm

You will also find a discussion of Excel's dynamic calculation sequence on
this website


Charles
______________________
Decision Models
The Excel Calculation Site.
www.DecisionModels.com

Kurt M. Sanger said:
I think that the order cells are processed is causing empty arrays to be
passed into my home made functions. What order does Excel use? Does it
process B1 before or after A2?

Myrna Larson said:
I *think* Stephen Bullen once told me that it calculates across, then down,
unless the formulas dictate a different order. If that's correct, B1 would be
calculated first.

But my question for you is, WHY do you want/need to know this???


 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top