Saving data from iterations of circular references

M

Michaelhahn

Hi all,

I have a circular reference that I can iterate to generate a whol
bunch of data. What I would like to do is to save the data from eac
iteration so that I can plot it on a chart. Is this possible? I don
seem to be able to do it? Has someone done this previously, if so how
Is there a macro I can use to do this?

Any help would be greatly appreciated.

Cheers

Michae
 
K

Ken Wright

Perhaps something like this:-

Assuming the range you want to chart is the cell C9, and you want to put that
data in Col A. Enter the data in the cell containing your variable and then run
the routine.

Sub Iterations()

Application.Calculation = xlCalculationManual
z = 1
Cells(z, "A").Value = Range("C9").Value 'The cell you want to chart
z = z + 1

Do
Application.Calculate
x = Range("C9").Value 'The cell you want to chart
Cells(z, "A").Value = x
z = z + 1
Application.Calculate
y = Range("C9").Value 'The cell you want to chart
Cells(z, "A").Value = y
z = z + 1
Loop Until y = x

Application.Calculation = xlCalculationAutomatic

End Sub

Just format the cells to as many decimals as you need subject to limits.
 
Top