+ Reply to Thread
Results 1 to 9 of 9

Retaining value from a formula if new result becomes in error

  1. #1
    Registered User
    Join Date
    09-22-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Retaining value from a formula if new result becomes in error

    [See attached file as an example]

    I want to be able to manage an auto count of items in a spreadsheet based on the current date. This I can do:

    [A1]
    =today()

    [A3]
    22/09/2010

    [B3]
    =if(A1=A3,countif(range,criteria)


    Problem
    I would also like to have a history of counts. My issue is having making this an automated exercise.

    [A4]
    22/09/2010
    [A5]
    23/09/2010
    [A6]
    24/09/2010


    [B3]
    =if(A1=A4,countif(range,criteria)
    [B4]
    =if(A1=A5,countif(range,criteria)
    [B5]
    =if(A1=A6,countif(range,criteria)

    Issue
    When a new date occurs, I loose the previous value. Is there some automated way to retain this value before it goes into error?
    Last edited by paulus_c; 09-22-2010 at 06:26 PM. Reason: Updated attachment to remove ambiguity with the use of =today() function

  2. #2
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: Retaining value from a formula if new result becomes in error

    Hi Paul,
    Try put this code in cell G8

    =IF(F8=$G$5,COUNTIF($C$8:$C$11,$G$7),"")
    copy down

    then put this code in cell K8

    =IF(G21<>"",G21,IF(J21=$K$5,COUNTIF($C$8:$C$11,$K$7)))
    copy down
    Last edited by BlastRanger; 09-22-2010 at 05:30 AM.

  3. #3
    Registered User
    Join Date
    09-22-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Retaining value from a formula if new result becomes in error

    Hi blastranger

    Thanks for taking a look at that for me.

    Unfortunately this does not solve my problem.

    I would like to keep a history of statuses, so that when the spreadsheet is opened on the next day, it would populate the updated result and retain the previous result.

    i.e. 3 completes on 22/09/2010, then 22/09/2010 = 3
    4 completes on 23/09/2010, then 23/09/2010 = 4

    Does this make sense?

  4. #4
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: Retaining value from a formula if new result becomes in error

    Well I got it.
    Before you type this formula, go to tools | option | Calculation (for Excel 2003)
    Check the Iteration, then change the Max Iteration value to 1
    Then in Cell G8 type this formula :
    =IF(G8<>"",IF(F8=$G$5,COUNTIF($C$8:$C$11,$G$7),G8))
    Please give a Reputation as a gift for a thanks.
    By clicking the second icon at the top right corner of a user post or reply

  5. #5
    Registered User
    Join Date
    09-22-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Retaining value from a formula if new result becomes in error

    Thank you blast ranger - that works perfectly. There is so many applications of this type of formula.

    What are the implications of selecting "Check the Iteration, then change the Max Iteration value to 1" to other aspects of a workbook?

    Thanks

    Paul

  6. #6
    Registered User
    Join Date
    09-22-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Retaining value from a formula if new result becomes in error

    (how do i mark this thread complete?)

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Retaining value from a formula if new result becomes in error

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  8. #8
    Forum Contributor BlastRanger's Avatar
    Join Date
    09-02-2010
    Location
    Indonesia
    MS-Off Ver
    2003, 2007, 2010
    Posts
    238

    Re: Retaining value from a formula if new result becomes in error

    Quote Originally Posted by paulus_c View Post
    What are the implications of selecting "Check the Iteration, then change the Max Iteration value to 1" to other aspects of a workbook?
    There will no implication with the other workbook. The option only apply to current Workbook.

  9. #9
    Registered User
    Join Date
    09-22-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Retaining value from a formula if new result becomes in error

    Hi Blastranger

    Thanks for helping me in the past. I hope you are still active on this forum because I need your assistance once more.

    I've been frequently using your formula, and it has been very useful.

    Now I want to further manipulate the stored entry, however if I use it in an equation it comes up as a zero

    =IF(VLOOKUP(B$16,$H$6:$K$9,4,FALSE)=$B$2,'Residential Pricing Model'!$BA$12,B17)

    B17 is the current and stored cell, but if the conditions change it still displays the correct amount, but then later disappears. If you could assist that would be great. (FYI the totals are monetry values and I'm using basic sum functions).

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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