+ Reply to Thread
Results 1 to 7 of 7

Running Subtotal

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Running Subtotal

    I want to calculate a running subtotal on a row by row basis, which is easy enough using:

    =SUBTOTAL(9,$AT$3:AT4372)

    but I want to base this subtotal on certain criteria from other columns, so I want to effectively say something like:

    =SUMIFS($AT$3:$AT$4372,$AT$3:$AT$4372,SUBTOTAL(9,$AT$3:AT4372),$G$3:$G$4372,$G206,$I$3:$I$4372,$I3)

    so the subtotal will only update based on the criteria in Colmuns G and I, how could I go about doing this as my approach is clearly wrong?

    Many thanks

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Running Subtotal

    you get better help, if you add your excel file, without confidentional information.

    Please also add the desired (expected) result.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Running Subtotal

    Maybe you can filter on column G and I.

    And in your subtotalformula you need the value 109 instead of 9.

    Without seeing your file, where i can test it,it's a guess.

  4. #4
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Running Subtotal

    Sample attached...

    What is the difference between 9 and 109, they appear to give the same results?
    Attached Files Attached Files

  5. #5
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Running Subtotal

    in the worksheet that you uploaded, if you could put the value "Company 1" (w/o quotes) in cell G1 and "Red" (w/o quotes) in cell H1, and then reference those static cells, then you could put this formula in cell D3 and drag-fill down:

    Please Login or Register  to view this content.
    if you were to reference values from within the column(s) that you are attempting to operate on, the results will be a hodgepodge. you could try the following and see how it looks - again in D3 and then drag-filled down:

    Please Login or Register  to view this content.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Running Subtotal

    For the most part I calculated your expected results but there were 2 that I couldn't see where you may have obtained the expected values. I highlighted these in yellow.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    05-12-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Running Subtotal

    its not elegant but in D4

    =SUMIFS($C4:$C4,$A4:$A4,"Company 1",$B4:$B4,"Red")

    and d5

    =SUMIFS($C4:$C4,$A4:$A4,"Company 1",$B4:$B4,"Red")+D4
    you can drop down after that

+ 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