Assume that a have some values in cells A1 and A2, respectively. In A3, there is a formula, =A1+A2. In a macro, in a loop I am changing values of A1 and A2, and then my code reads the value in A3, which is a function of A1 and A2. It is basically as follows;
for i = 1 to 10
Range("A1").Value = Range("A1").Value + i
Range("A2").Value = Range("A2").Value + i*2
somearray(i) = Range("A3").Value
Next i
So during an iteration, how can I be sure that A3 is already updated according to new values of A1 and A2, before I get the value in A3 to assign in an array? I just used very simple formula to explain it clearly, but in my real code, there will be very complex formulations, so I need to be sure that I am recording correct (updated) values in A3. Could anybody help me to clear my mind? Can we say that vba automatically updates value in A3 and does not goes to next line of my code without finishing the formula update?
Thanks in advance, Abdullah