+ Reply to Thread
Results 1 to 4 of 4

Sumproduct meeting two Criteria

  1. #1
    Registered User
    Join Date
    12-08-2013
    Location
    Michigan, America
    MS-Off Ver
    Excel 2007
    Posts
    16

    Sumproduct meeting two Criteria

    Hi all,

    I'm working on a spreadsheet at work and I'm trying to sum only the values in a column that meet criteria in the column next to it. For example, in the attached spreadsheet, I would like to have a totals line at the bottom of the spreadsheet for all three Facilities and the total next to them. I know I could do a pivot table but I know this approach would be more aesthetic and easier for my supervisor.

    Thanks for the help!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,070

    Re: Sumproduct meeting two Criteria

    If you already have the unique locations....

    A
    B
    26
    Facility 1
    $ 63,196.00
    27
    Facility 2
    $ 41,320.00
    28
    Facility 3
    $ 16,707.00


    B26=SUMIF($A$2:$A$22,A26,B2:$B$22)
    copied down

    If you dont have unique locations, use this...
    A26=IFERROR(INDEX($A$2:$A$22,MATCH(0,INDEX(COUNTIF($A$25:A25,$A$2:$A$22),0,0),0)),"")
    copied down
    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
    Registered User
    Join Date
    12-08-2013
    Location
    Michigan, America
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Sumproduct meeting two Criteria

    Wow, that worked like a charm. Thanks so much!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,070

    Re: Sumproduct meeting two Criteria

    Sorry, there waqs an error in that 1st formula (left out a $). If should have been...
    =SUMIF($A$2:$A$22,A26,$B$2:$B$22)

    IF you want the sumproduct equivalent....
    =SUMPRODUCT(($A$2:$A$22=A26)*($B$2:$B$22))

+ 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] SUMPRODUCT or COUNTIFS to Return Sum of Numbers Meeting Year and Part Number?
    By d_striker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2013, 04:01 PM
  2. Replies: 6
    Last Post: 06-10-2012, 11:13 PM
  3. [SOLVED] Excel 2007 : Meeting criteria in a range
    By Richmate in forum Excel General
    Replies: 5
    Last Post: 05-17-2012, 05:40 AM
  4. SUMPRODUCT Evaluation for TRUE or FALSE for all the Meeting Criterions?
    By e4excel in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 01-06-2012, 08:01 PM
  5. [SOLVED] using sumproduct on subtotals meeting certain conditions
    By Jeff Manning in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-09-2005, 08:40 PM

Tags for this Thread

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