+ Reply to Thread
Results 1 to 7 of 7

Nest SumIFS inside subtotal

  1. #1
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Asheville NC
    MS-Off Ver
    Excel for Office 365 MSO
    Posts
    111

    Nest SumIFS inside subtotal

    I currently use SUMIFS formula: =SUM(SUMIFS(KZ6:KZ598,$M$6:$M$598,"a",$F$6:$F$598,"car")). Is there a way that if I use a drop down to sort that I can incorporate a Subtotal formula so that the value changes with the sort?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Nest SumIFS inside subtotal

    I recommend a helper column.

    Say O6 for example
    O6 filled down
    =SUBTOTAL(103,M6)

    Then use
    =SUMIFS(KZ6:KZ598,$M$6:$M$598,"a",$F$6:$F$598,"car",$O$6:$O$598,1)

    Also not sure why you had SUM(SUMIFS(...))
    That sum seemed redundant, so I removed it.

  3. #3
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Asheville NC
    MS-Off Ver
    Excel for Office 365 MSO
    Posts
    111

    Re: Nest SumIFS inside subtotal

    Is there any way to not use a helper column? The spread sheet already has many, many columns. I'm trying to get this to formula to work: =SUBTOTAL(9,SUMIFS(Q6:Q598,$M$6:$M$598,"a",$F$6:$F$598,"car")). So if I sort a column to see only Ford cars, the total sum will change as I sort for car types. Using the SUMIFs works fine for seeing all cars within the range but I can't figure out how to make it a "subtotal function".

    Thanks for the redundant "sum" comment. I removed it.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Nest SumIFS inside subtotal

    Try this:

    =SUMPRODUCT(SUBTOTAL(9,OFFSET(KZ6,ROW(KZ6:KZ598)-ROW(KZ6),0)),(M6:M598="a")+0,(F6:F598="car")+0)

  5. #5
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Asheville NC
    MS-Off Ver
    Excel for Office 365 MSO
    Posts
    111

    Re: Nest SumIFS inside subtotal

    AWESOME! Thank you.

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Nest SumIFS inside subtotal

    You're welcome. Thanks for the rep!

  7. #7
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Asheville NC
    MS-Off Ver
    Excel for Office 365 MSO
    Posts
    111

    Re: Nest SumIFS inside subtotal

    I've spent the last hour trying to understand what the formula is doing but am not quite sure. Could you clarify? I think I understand SUMPRODUCT is multiplying arrays (Rows KZ, M & F), Subtotal with 9 is summing "visible data in row KZ if it meets conditions in rows M and F. I understand Offset function returns data from a specified cell/range and the data can be summed by specifying the width/height.

    Is the formula saying "start at cell KZ6, sum visible data within the range of KZ6-KZ598 (that meets criteria), but really don't offset? What does the zero do at the end of this array and the +zero's in the other arrays?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] IF formula inside SUMIFS?
    By ovehendrix in forum Excel General
    Replies: 9
    Last Post: 10-18-2023, 04:55 AM
  2. Problem using Lookup inside Sumifs
    By ap1980 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-06-2017, 05:22 AM
  3. Replies: 2
    Last Post: 05-22-2014, 04:14 AM
  4. Can you nest multiple SUMIFS into a formula?
    By DorothyFan1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-29-2011, 05:17 PM
  5. Excel 2007 : SUM inside SUMIFS?
    By thart21 in forum Excel General
    Replies: 4
    Last Post: 09-30-2011, 01:58 PM
  6. Excel 2007 : sumifs inside of a vlookup ?
    By budchevy in forum Excel General
    Replies: 4
    Last Post: 05-15-2011, 06:33 PM
  7. Left and Mid functions inside subtotal.
    By klund in forum Excel General
    Replies: 12
    Last Post: 05-05-2009, 05:16 PM

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