Iteration Counter?

G

gdmw

Is the iteration counter accessible (i.e., readable by a formula such as
INFO) in Excel 2000? I would like to use that to vary my convergence
formula, depending how slowly or quickly (or whether) my calculations
converge. It would be nice to avoid VBA if possible. I've guessed
INFO("iteration") and INFO("counter") without success. Thanks for any
help!

Geoff Wilkie
 
J

J.E. McGimpsey

I don't think it's exposed in the GUI. Here's a UDF:

Public Function Iter() As Variant
Iter = Application.MaxIterations
End Function
 
J

J.E. McGimpsey

hit post too early:

You can't use a worksheet function to set environment parameters,
formats, etc. To do that requires a macro:

Public Sub SetIterations()
Dim nIters As Integer
With Application
nIters = .InputBox("How many iterations?", Type:=1)
If nIters > 0 Then .MaxIterations = nIters
End With
End Sub
 
G

gdmw

I'm not looking for the maximum number of iterations, nor am I trying to
change any environment parameter. I want to READ the CURRENT iteration
number - the number that is actually being incremented at the bottom of
the screen "Iter: nn". Read-only is fine (though I could find some
uses for zeroing the counter!).
 
J

J.E. McGimpsey

I don't know anywhere that's exposed. The calculation engine
certainly isn't accessable from the object model. Perhaps someone
else knows of an API call that can grab the counter, but I've never
seen it.
 

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

Top