Iteration Counter?

  • Thread starter Thread starter gdmw
  • Start date Start date
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
 
I don't think it's exposed in the GUI. Here's a UDF:

Public Function Iter() As Variant
Iter = Application.MaxIterations
End Function
 
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
 
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!).
 
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.
 
Back
Top