+ Reply to Thread
Results 1 to 7 of 7

Checking the minimum of iterative calculations:

  1. #1
    Registered User
    Join Date
    04-06-2016
    Location
    Trivandrum, India
    MS-Off Ver
    2010
    Posts
    4

    Lightbulb Checking the minimum of iterative calculations:

    Anyone please help me.....I want to compare the results of one iteration to its previous iteration and update the lowest of the values in a new cell. The new cell values should always show the lowest value of all iterations. How could I do that?

  2. #2
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Checking the minimum of iterative calculations:

    you should be a little bit more specific of what you mean by iteration and how your sheet is set up.

  3. #3
    Registered User
    Join Date
    04-06-2016
    Location
    Trivandrum, India
    MS-Off Ver
    2010
    Posts
    4

    Re: Checking the minimum of iterative calculations:

    Thank you very much for the reply... I will explain the problem. The values of the cells are linked formulas based on random numbers and it will be updated and recalculated to a new value by using the F9 tab. Once the value of the cell got updated, I am unable to find or save the previous value and I want to compare the updated value of a particular cell to that of the previous value and I want to obtain the lowest of values.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Checking the minimum of iterative calculations:

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).

  5. #5
    Registered User
    Join Date
    04-06-2016
    Location
    Trivandrum, India
    MS-Off Ver
    2010
    Posts
    4

    Re: Checking the minimum of iterative calculations:

    Thank you very much for your kind help
    The values shown in yellow highlights starting from Cell B 249 are the values obtained using a set of formulas calculated above. Each time the values are recalculated using the F9 tab, the chk fn will get updated. The values of chk fn in the cell B 249 needs to be compared with the next obtained value after recalculation and if the chk fn value is less, it should be updated in cell B264 , otherwise retain the values. The values shown in blue highlights starting from B 264 should represent the values corresponding to the chk fn. So that the lowest value for chk fn should be obtained after several recalculations in cell B264 and the corresponding values in the blue highlighted area. The problem is shown in the attached screenshot. Please help me in this regard.
    Attached Images Attached Images
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Checking the minimum of iterative calculations:

    Ok thats already a good base but i am not sure if i understand the need so let me try to summarize it my way.

    1. You Hit F9 and Recalculation happens
    2. You want to Check if the Yellow FN is lower than the Blue FN
    3. if yellow is lower than blue all the yellow values are stored in the blue area
    4. if yellow is bigger than blue blue stays untouched

    This way blue always holds the optimal parameters

    Is that correct so far?

    Edit: I made a sheet based on my assumptions so if i am right you already have something to work with.
    Some information about it.

    1. i set the Calculation mode of the Sheet to Manual so Calculation only happens if you press F9 this way it will not always be triggered when you change a cell.
    2. I see in Column AF you have some Circula Reference Formula to count itereations that should be removed ( i did not remove it)
    3. I added a counter for iterations in B252 which adds 1 every time calculation happens
    4. i wrote a small script that is linked with the button "auto Iterate" it will ask you how many iterations you want to be done then calculate the sheet that many times
    when it is finished it tells you in a message box how often the blue fn changed while doing the iterations and at wich iteration it changed the last time so if you do 1000 iterations for example it says
    "Minfn changed 20 times in 1000 Iterations and the last change happend in Iteration 459"

    Thats about it hope i understood your request correctly :D
    edit2: you can remove the last msgbox from the code used it to check how long it runs with and without screen update :D
    Attached Files Attached Files
    Last edited by LordLoki; 04-07-2016 at 04:36 AM.

  7. #7
    Registered User
    Join Date
    04-06-2016
    Location
    Trivandrum, India
    MS-Off Ver
    2010
    Posts
    4

    Re: Checking the minimum of iterative calculations:

    Exactly the same as you mentioned is needed for calculation. Thank you so much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Iterative Formula
    By kathrynreno in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2016, 09:23 PM
  2. Replies: 7
    Last Post: 04-17-2013, 03:53 PM
  3. Replies: 4
    Last Post: 12-10-2012, 06:22 PM
  4. Fixing a divide by 0 error with iterative calculations
    By jrm0523 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2012, 02:30 PM
  5. [SOLVED] Need a formula to find the minimum value in an array, then perform calculations on ....
    By jschneider92 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-06-2012, 12:59 AM
  6. Replies: 3
    Last Post: 04-01-2012, 05:37 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1