+ Reply to Thread
Results 1 to 4 of 4

Thread: SUMIF or IF without returning to false or zero value

  1. #1
    Registered User
    Join Date
    08-20-2007
    Posts
    21

    SUMIF or IF without returning to false or zero value

    I have some trigger cells (0 or 1) based on time of day. I would like to calculate some other cells and place the resulting value in the cell. This obviously works with a SUMIF or IF when TRUE, but as soon as the trigger goes false the cell value returns to zero of FALSE. I need the resulting value to remain what it was in the true state and nothing to change when it goes false (only update the cell on a true condition). I would like to do this with a function instead of a macro since I already have several other macros running and I need to do this with several cells.

    For example: cell A1 becomes 1. When A1 is TRUE or 1, the sum of A2 and A3 is placed in B1. When A1 returns to FALSE or 0, the B1 cell remains the same (nothing changes on a true to false).
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: SUMIF or IF without returning to false or zero value

    Hi.. If you are wanting to use function instead of macro, as far as I can see, you can only do that if you change the workbook calculation from automatic to manual.
    Cheers

  3. #3
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,523

    Re: SUMIF or IF without returning to false or zero value

    Why have a "false" state if you always want it to remain what it was in the "true" state?

    Your logic is:

    If A1 = 0, then A2+A3, else
    If A1 = 1, then A2 + A3

    Your formula: =IF(A1=1,A2+A3) returns false when A1 = 0

    However, the only alternative is to use
    =IF(A1=1,A2+A3,A2+A3)

    Which calculates A2+A3 regardless of whether A1 = 1 or 0 and is no different than just the simple formula of =A2 + A3

    Maybe I am not getting it, but perhaps you should try explaining more clearly and provide an updated workbook with a few more (realistic) examples.
    Last edited by Palmetto; 01-03-2012 at 08:10 PM.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  4. #4
    Registered User
    Join Date
    08-20-2007
    Posts
    21

    Re: SUMIF or IF without returning to false or zero value

    I am trying to copy a cell value which is an external reference. This value increases over a 24 hour period. I want to capture the value at each hour and save it in another cell. So at the end of 24 hours I have 24 cells with the value at each hour.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0