LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Excel Iteration Problem/not capable??????????

Hellio!!!!!!!!!!

Thanks anyway, but I have dealing with 15 worksheet in my real problem and
each time re enter all values is not possible. but I have got the answer from
a friend of mine. Paste the below module and run the macro, which will give
give you the result.


Sub WorkaroundToForceUDFCalculation()
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
With sht
.Cells.Replace What:="=", Replacement:="=", LookAt:=xlPart,
SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False
End With
Next sht
End Sub

Sincerely

Raj
New Delhi


"Dana DeLouis" wrote:

Hi. What I believe is happening is the following.
Both A1, & B1 are not numbers, but are the results of a Custom Function in
C1.

When the Workbook is open, A1 & B1 do not have any information. This lack
of Information is passed to your vba Function, and this returns a #Value
error.
This value error is passed back to A1 & B1, and the error goes back into
C1. Hence you are stuck, and can't get out of this error loop.
I don't believe Excel has any logic to get itself out of these types of
loops when opened.
You will have to re-enter the data in order for Excel to pick up the
calculation again.

The workaround for your situation might be the following.
In the vba editor (Alt+F11) enter the following code on the "ThisWorkbook"
module.
When this particular workbook is opened, we make sure Iteration is turned
on, and we re-enter your Formulas.
This worked well for me using Excel 2007.

Private Sub Workbook_Open()
With Application
'// Make Sure Iteration is turned on
.Iteration = True
.MaxIterations = 1000
.MaxChange = 0.0000001

'Re-Enter Formulas
[C1:C3].Formula = [C1:C3].Formula
End With
End Sub

--
"To understand recursion, one must first understand recursion."
Dana DeLouis




"raj74" wrote in message
...
Everything I have checked in for iteration process like you mentioned in

tool
option calculation. I have interested not the result of the file I

have
posted (in my first post) but the activation it requires (output cell

having
an UDF) to get the correct result.
I was reading something called application.volatile in excel to force to
start the calculation of UDF (user define function) to recalculate a
particular sheet. But i don't know how to write the code or whether it

is
useful for my case.
As an alternative soln, if any code can be written so that after running

it,
it will activate a formula (my interpolate UDf function) of a particular

col
(say, D1:D40)l and enter it to get all the output result what I am doing
mannually.

Thanks anyway for giving your time.

sincerely

Raj

"Dana DeLouis" wrote:

I'm not sure, but under Tools | Options, do you have "enable iterative

calculation" turned on?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
iteration Gareth Milton Excel Discussion (Misc queries) 1 March 28th 07 04:18 PM
Iteration problem (Excel 2002) Stefan Kasserra Excel Worksheet Functions 1 July 17th 06 11:38 PM
Help requested for Excel Iteration problem Sree Excel Discussion (Misc queries) 2 June 22nd 06 09:54 PM
Iteration M. Homayon Excel Discussion (Misc queries) 1 January 11th 06 01:05 AM
How do I resolve complex iteration problems in Excel? William Sporborg Excel Discussion (Misc queries) 7 September 21st 05 03:06 PM


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"