+ Reply to Thread
Results 1 to 11 of 11

How to create a cumulative SUMIF?

  1. #1
    Registered User
    Join Date
    12-16-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    8

    How to create a cumulative SUMIF?

    Hey guys,

    I'm familiar with the SUMIF function, but am having difficulty creating a specific function which only sums up to the current cell... i.e. a cumulative SUMIF column.

    I have attached a spreadsheet with a simplified version of my data but essentially the idea is this:

    I would like to SUM all the sales of a certain product up to that particular sale... if I were to just use the normal SUMIF my cumulative cell would constantly update as later sales were added.

    Any help?

    Many thanks,

    Todd

    SUMIF Cumulative Calculation.xlsx
    Last edited by makkystyle; 01-19-2012 at 05:43 PM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: How to create a cumulative SUMIF?

    I am not sure I understood You in proper way but try attachment (Array formula)
    Attached Files Attached Files
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: How to create a cumulative SUMIF?

    Try this to use SUMIF this way:

    =SUMIF(C$3:C3,C3,D$3:D3)

    copy down. Block the first cell in range & sum_range
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Registered User
    Join Date
    12-16-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How to create a cumulative SUMIF?

    Thank you for the quick responses guys... I don't think I explained my problem clearly enough so I have updated my example file. Essentially the idea is that I would like to know what my total sales of an individual product are up to a each date or sale... i.e. a cumulative total. The problem is that after a certain threshold of sales my cost goes down for that product and I want to reflect that in some other calculations so this cumulative total can tell me when in the year I hit that threshold.

    Should be clearly demonstrated in the attached spreadsheet. Basically I am hoping that there is a variant of the SUMIF formula so that this cumulative total column can identify which product was sold and then what the total sales for that product were up to this particular date.

    New example attached for clarity.

    Thank you!!!

    SUMIF Cumulative Calculation_2.xlsx

  5. #5
    Registered User
    Join Date
    12-16-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How to create a cumulative SUMIF?

    If some more clarity would help here is the last file with an additional example of how I thought this might work, but unfortunately it doesn't seem to stick.

    SUMIF Cumulative Calculation_3.xlsx

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to create a cumulative SUMIF?

    Hi

    Maybe, just maybe, this;in F5:

    =SUMIF($C$3:C5;C5;$D$3:D5)

    Copy down.

    Hope to helps you
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to create a cumulative SUMIF?

    Example...
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-16-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How to create a cumulative SUMIF?

    Thanks for your replies guys. Fotis' solution worked. I needed to adjust the rows slightly but otherwise a good solution. A note that I found is you cannot use column references in your formula because for this particular formula you need to be more strict about which rows are included or not.

  9. #9
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: How to create a cumulative SUMIF?

    if you used my last formula correctly will work, =SUMIF(C$3:C3,C3,D$3:D3)

    See the attached. Since you are on table format, will adjust automatically, if you add new/delete data
    Attached Files Attached Files

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to create a cumulative SUMIF?

    Glad that you found your solution!

  11. #11
    Registered User
    Join Date
    06-03-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: How to create a cumulative SUMIF?

    Hi Tom, I appreciate this post is old, but I was struggling to get my head around an array formula I was writing, this was perfect and the help I needed, 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