+ Reply to Thread
Results 1 to 7 of 7

SUMIF on filtered list

  1. #1
    Forum Contributor
    Join Date
    10-11-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    230

    SUMIF on filtered list

    I need to sum a row of data if another row shows Cap. The SUMIF formula works for that but now I need to sum the data if the list is filtered.
    Col A contains the category of cost. Col B says if it is Cap or Exp. Col C-N shows the monthly totals for each. I need a formula at the top in row 1 that will sum the data in rows 2-50 based on the filters applied. Can anyone help me?
    Thanks.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: SUMIF on filtered list

    You may be able to use =subtotal(109,range), but that wont sum based on criteria.

    Try a sumifS(), to include the filter criteria?

    Maybe upload a sample WB?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    10-11-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: SUMIF on filtered list

    Attached is a sample file. You will see the first 3 columns can be filtered depending on need. Then I'd like the first two rows of totals to change based on the filters in columns A-C. Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMIF on filtered list

    Try this...

    Entered in D1:

    =SUMPRODUCT(SUBTOTAL(9,OFFSET(D$4,ROW(D$4:D$19)-ROW(D$4),0)),--($C$4:$C$19=$C1))

    Copy down to D2 then across as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Contributor
    Join Date
    10-11-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: SUMIF on filtered list

    WooHoo! Thank you so much!!! It works perfectly.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMIF on filtered list

    You're welcome. Thanks for the feedback!

  7. #7
    Registered User
    Join Date
    03-21-2013
    Location
    Fremont, CA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: SUMIF on filtered list

    You rock Tony! Thanks.

+ 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] Excel VBA - Issue in Naming Filtered Range on a Filtered List.
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2014, 01:17 PM
  2. [SOLVED] Sumif with filtered data
    By Yokoblue in forum Excel General
    Replies: 5
    Last Post: 07-16-2012, 01:56 PM
  3. Sumif for filtered data
    By Azam Ali in forum Excel General
    Replies: 12
    Last Post: 05-26-2011, 03:42 AM
  4. SumIF through filtered data
    By Kumara_faith in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-19-2006, 07:05 PM
  5. Filtered SUMIF
    By mouseman5 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2005, 04:32 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