+ Reply to Thread
Results 1 to 5 of 5

Subtotal with Sumifs

  1. #1
    Registered User
    Join Date
    02-06-2020
    Location
    Lahore, Pakistan
    MS-Off Ver
    365
    Posts
    29

    Subtotal with Sumifs

    Hello Sirs,

    Hope you are doing great

    I have a simple worksheet where I want to see totals of filtered values. A formula which could give total values based on applied filter on column B (Group) in cells D25 & D26 based on criteria Paid and Pending+Empty Cell (empty cell is also considered as pending).

    Would be greatful and would be available for anymore clarification if required.

    Looking forward
    Abdul Ghaffar
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-26-2019
    Location
    seoul, south korea
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Subtotal with Sumifs

    PivotTables make it easier to get results.
    Nevertheless, if you do it as a formula, you can take a few steps.

    First enter the following formula in the Q column and give it a heading of "Match".

    q5
    =MATCH([Group],[Group],0)

    Create a "Match" column and enter the formula below.
    However, only one "Group" filter should be selected for normal results

    d25
    =IFERROR(AVERAGEIFS(Table1[Membership Fee],Table1[Match],SUBTOTAL(101,Table1[Match]),Table1[Sep-19],"Paid"),"")

    d26
    =IFERROR(AVERAGEIFS(Table1[Membership Fee],Table1[Match],SUBTOTAL(101,Table1[Match]),Table1[Sep-19],"<>Paid"),"")

  3. #3
    Registered User
    Join Date
    02-06-2020
    Location
    Lahore, Pakistan
    MS-Off Ver
    365
    Posts
    29

    Re: Subtotal with Sumifs

    Hello Sir,

    Thank you so much for your detailed response,

    I have been able to achieve accurate results for one section i.e. Paid using the below formula:
    =SUMPRODUCT(SUBTOTAL(9,OFFSET($C$8,ROW($C$8:$C$25)-ROW($C$8),0)),(D8:D25="Paid")+0)

    However, can you please help how can I get filtered totals using the above formula with two conditions i.e.
    I want to use it where cell in range D8:D25 contains either "Pending" or an empty/blank cell.
    both empty cell and cell containing Pending should be considered as one thing.
    Hope it makes better sense now.

    Thank you again. Best Regards

  4. #4
    Registered User
    Join Date
    12-26-2019
    Location
    seoul, south korea
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Subtotal with Sumifs

    It's a nice formula.
    I'm glad to know the formula I didn't know.
    Thank you.

    See below for non-Paid cases.

    =SUMPRODUCT(SUBTOTAL(9,OFFSET($C$5,ROW($C$5:$C$22)-ROW($C$5),0))*(D$5:D$22<>"Paid"))

    or

    =SUMPRODUCT(SUBTOTAL(9,OFFSET($C$5,ROW($C$5:$C$22)-ROW($C$5),0))*(D$5:D$22={"Pending",""}))

  5. #5
    Registered User
    Join Date
    02-06-2020
    Location
    Lahore, Pakistan
    MS-Off Ver
    365
    Posts
    29

    Re: Subtotal with Sumifs

    Thank you so much, it worked like a charm.
    Best Regards

+ 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] SUMIFS does not match SUBTOTAL
    By allheilyb1 in forum Excel General
    Replies: 9
    Last Post: 09-15-2015, 02:40 PM
  2. USING sumifs AND SUBTOTAL
    By The Fly in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2014, 04:57 PM
  3. [SOLVED] Sumifs + subtotal + hidden filters
    By cf123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-29-2014, 04:34 AM
  4. [SOLVED] SUBTOTAL with SUMIFS
    By DaddyDiddy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2014, 06:51 AM
  5. How to combine Subtotal, Sumifs and more
    By Tipler93 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-23-2014, 12:12 PM
  6. Using SUMIFS with SUBTOTAL and filters
    By fozzie_1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-13-2012, 07:08 AM
  7. Combining SUMIFS with SUBTOTAL
    By e_lad in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-16-2011, 11:23 AM

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