+ Reply to Thread
Results 1 to 4 of 4

SUMIFS Function To Reset SUM if "x" is placed to "0" ??

  1. #1
    Registered User
    Join Date
    01-19-2012
    Location
    St Catharines, ON
    MS-Off Ver
    Excel 2010
    Posts
    2

    SUMIFS Function To Reset SUM if "x" is placed to "0" ??

    Hi,

    I am trying to figure out how to do a sumif function on column a that has the dates, column b that contains numbers to be added:


    A B


    January-12-13
    January-13-13 500
    January-14-13 x
    January-15-13 400
    January-16-13 600


    I would like to have column B added up only from the current date and before the current date up to the last "x".

    If today was the 16th of January, I would like to have 600 added with 400 only, because there is an "x" the day before and it will need to stop at the most recent "x".
    And: If today was the 16th of January, and column B for today's date contains an x, not a number, I would like that the formula to reset it instead to "0".

    A B C
    January-12-13 400 400
    January-13-13 500 900
    January-14-13 x 0
    January-15-13 400 400
    January-16-13 600 1000

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: SUMIFS Function To Reset SUM if "x" is placed to "0" ??

    If your dates start in A2, and the numbers to be added in B2, put this formula in C2 and fill down and see if it works:

    =IF(B2="x",0,C1+B2)

    C1 should be blank

    - Moo

  3. #3
    Registered User
    Join Date
    01-19-2012
    Location
    St Catharines, ON
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: SUMIFS Function To Reset SUM if "x" is placed to "0" ??

    Hi, Thank you for your reply. I have tried the formula and it works. I was wondering if instead a bunch of text is typed in column b, can the number be reset to 0? If so, x would need to be replaced. I would like the option to be able to put in text (no specific text) which resets to zero or also a number which sums up b2 with c1.

    Thank you.

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: SUMIFS Function To Reset SUM if "x" is placed to "0" ??

    You could change the formula to:

    =IF(ISTEXT(B2),0,C1+B2)

    Then, if ANY text value (non-numeric) is entered in column B, that row will reset to 0.

    - Moo

  5. #5
    Registered User
    Join Date
    01-19-2012
    Location
    St Catharines, ON
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: SUMIFS Function To Reset SUM if "x" is placed to "0" ??

    Perfect, 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)

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