+ Reply to Thread
Results 1 to 6 of 6

Using SUMIFS with SUBTOTAL and filters

  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    Bolton
    MS-Off Ver
    Excel 2010
    Posts
    3

    Using SUMIFS with SUBTOTAL and filters

    Hi, I've tried to find a solution for this and found a great thread about how to use SUMIF and SUBTOTAL using the SUMPRODUCT function, but it didn't help with using filtered lists.

    Can someone help me with this problem.

    I've created a simple table to demonstrate the requirement but essentially, I'm trying to sum the values of one column '£Value' when the value in another column 'Period' equals Q1, but also taking into account the filter choices I make - in this case where Product = Blue, Product Cat = Peelers and ID does not include Blanks.

    Then I wish to repeat the same formula where the value in 'Period' equals Q2 etc etc.

    I've tried using this formula, which works great with the filters, but its missing the element which deals with 'only return results where Period = Q1 etc.

    =SUMPRODUCT(($C$2:$C$27)*(SUBTOTAL(3,OFFSET($C$2,ROW($B$2:$C$27)-MIN(ROW($C$2:$C$27)),,))))

    Can someone help?. I'm sure its easy, but I'm a bit kak at excel. :-)

    Thanks

    Fozzie_1
    Attached Files Attached Files

  2. #2
    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: Using SUMIFS with SUBTOTAL and filters

    Perhaps.

    =SUMPRODUCT((Table1[Period]=A31)*$C$2:$C$27)*(SUBTOTAL(3,OFFSET($C$2,ROW($B$2:$C$27)-MIN(ROW($C$2:$C$27)),,)))
    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.

  3. #3
    Registered User
    Join Date
    07-17-2012
    Location
    Bolton
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using SUMIFS with SUBTOTAL and filters

    thanks Fotis.

    I did have the formula wrong, (B instead of C in one of the ranges) - so I've amended that first.
    But, after adding in the suggestion you made, its still not returning the results as per the forumla check in C31 to C34.

    Do you have any more suggestions on how to make this work? Re-attached with your formula added in.

    Thanks

    Fozzie_1
    Attached Files Attached Files

  4. #4
    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: Using SUMIFS with SUBTOTAL and filters

    Formula, should be this.

    Please Login or Register  to view this content.
    Also we can use this shorter formula.

    Please Login or Register  to view this content.
    I think..it's OK, now.
    Attached Files Attached Files

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using SUMIFS with SUBTOTAL and filters

    perhaps
    =SUMPRODUCT((Table1[Period]=A31)*(SUBTOTAL(9,OFFSET($C$2,ROW($C$2:$C$27)-MIN(ROW($C$2:$C$27)),,1))))
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Registered User
    Join Date
    07-17-2012
    Location
    Bolton
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using SUMIFS with SUBTOTAL and filters

    Fotis, that is brilliant, thanks very much :-) And also thanks for responding so quickly.

    Fozzie_1

+ 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