LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Excel 2002 - Iterations - Find the iteration sequence number

Hi all,

[A LOT OF TEXT, MIGHT HOP TO "QUESTION" BELOW, sry]

I use Iterations/Circular references to solve for a variable
(basically, it is a yield-to-maturity finder and no, the Excel
functions do not suffice).

The circular reference is basically set up such that I
1. Enter a value, i.e. Price
2. I have a "static" start value
3. I have a "variable" which basically records the deviation to the
start value to try (so that I am trying Start Value + Variable Value
as YTM)
4. I calculate the Price based on the YTM as under 3
5. I calculate the difference between 4 and 1
6. I calculate a new YTM to try under 4 by changing the Variable Value
under 3 based on the differnce in 5. (So basically I say Variable
Value = Variable Value + Change, or e.g. in B10 I would have "=B10 +
B11" and B11 would recede to zero after some iterations).

I found that simply programming a circular, and thus have Excel make
the guesses, caused it to be very slow and need many iterations.
Therefore, I created the structure as above.

I am trying to speed things up a bit further and to do that I am
trying to debug the UDF I use (reason for using a UDF is to avoid
issues with #VALUEs occuring in the circular structure due to other
issues, sort of error handling which works great. I know that using a
UDF probably slows things down and may get round doing it in Excel
competely later). The UDF basically gets me a new YTM to use. I want
to optimise the algortihm the get me he next guess therefor.

QUESTION

Now I can print.debug everthing I want except for one thing: The
iteration sequence number it is currently working on. When it
iterates, the statusbar will show "Iter: ##", and I want to print that
number with the other debug values each time the UDF is called.

Is there a way to do this? I would be satisfied if I could "read" the
text in the statusbar and print that to the Immediate window, but I
have not found a way to do it.

[Geesh, that's a lot of text for a simple query, sry]
 
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
Excel 2002: How to fill group of of odd number in sequence ? Mr. Low Excel Discussion (Misc queries) 9 March 28th 09 11:35 PM
Excel 2002: How to find 0.00 in a column of number? Mr. Low Excel Discussion (Misc queries) 4 October 26th 08 12:19 AM
Iteration problem (Excel 2002) Stefan Kasserra Excel Worksheet Functions 1 July 17th 06 11:38 PM
How do I find the next higher number in a sequence? CasaJay Excel Discussion (Misc queries) 4 June 23rd 06 10:42 PM
How do I find a missing number in a sequence of numbers? Nash Excel Worksheet Functions 2 August 11th 05 04:22 AM


All times are GMT +1. The time now is 08:50 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"