+ Reply to Thread
Results 1 to 5 of 5

Sum cells once one has reached a value

  1. #1
    Registered User
    Join Date
    12-11-2006
    Location
    London
    Posts
    37

    Sum cells once one has reached a value

    I am trying to sum cells once one has passed a set value (criteria).

    I've tried using SUMIF, SUMIFS, COUNTIF, AND formulas in various combinations and searched forums for what appears to be a simple problem, but no joy
    I have three cells in columns headed P, M, D (A3,B3,C3). Each can have values from 0 to 17.
    I want to add the cells in column P&M (A3, B3) together once the cell in column P is equal to 17, result in the cell D3.

    Then when the cells in columns P&M are both equal to 17 (A3, B3) I want to add them to the value in the D column cell (C3).

    If this can be combined into one formula that would be fine.

    Again, I find the simple calculations harder to formulate than the more complex ones?

    Any advice or help appreciated I just know someone has done this before somewhere.
    Attached Files Attached Files
    Last edited by edmdas; 09-18-2010 at 02:32 PM. Reason: Solved

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum cells once one has reached a value

    In D3:

    =IF(C3=17,SUM(A3:B3),0)

    in E3:

    =IF(AND(A3=17,B3=17),D3+17,0)

    if you want to combine formulas:

    =IF(AND(A3=17,B3=17),IF(C3=17,SUM(A3:B3),0)+17,0)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-11-2006
    Location
    London
    Posts
    37

    Re: Sum cells once one has reached a value

    Thanks NBVC!

    The value in cell D3 varies from 0 to 17 as well so I made a few adjustments which appear to work:

    Cell D3 as: =IF(A3=17,SUM(A3:B3),0)

    Cell E3 as: =IF(AND(A3=17,B3=17),D3+C3,0)

    and the combined formula as: =IF(AND(A3=17,B3=17),SUM(A3:C3),0)

    Could you just check my logic here?

    Thanks for the pointer, this will be very useful elswhere

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum cells once one has reached a value

    Looks okay to me.

  5. #5
    Registered User
    Join Date
    12-11-2006
    Location
    London
    Posts
    37

    Re: Sum cells once one has reached a value

    Thanks! - works great

+ 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.6.0 RC 1