+ Reply to Thread
Results 1 to 5 of 5

sum product w/ multiple criteria

  1. #1
    Forum Contributor TechRetard's Avatar
    Join Date
    06-14-2009
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    202

    sum product w/ multiple criteria

    columns
    A = criteria 1
    B = criteria 2
    C = value 1
    D = value 2


    how do i get the sum of all like critera 1&2 values multipled together (value 1 x value 2)

    i.e.
    A B C D
    cat house 2 5
    cat house 2 6
    cat house 1 8
    dog house 2 9
    dog home 2 8

    for cat/house as critera,...answer would be 2*5 + 2*6 + 1*8=30
    TechRetard.ToString();

    There are always multiple ways to do something, when it doubt, drink a beer.

    I do not care if you rep or not but please mark post as Solved if there is resolution so I stop going back and checking if anything else is needed.

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: sum product w/ multiple criteria

    =Sumproduct(A2:A100,C2:C100)+Sumproduct(B2:B100,d2:d100)

    Change ranges as needed

    EDIT: My bad, I didn't read the rest of your post. Why does this always happen. I'll be back in few...
    Last edited by ron2k_1; 09-06-2011 at 03:27 PM.
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  3. #3
    Registered User
    Join Date
    06-29-2010
    Location
    Central Texas
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: sum product w/ multiple criteria

    This should work

    SUMPRODUCT(--(A2:A6="cat"),--(B2:B6="house"),(C2:C6)*(D2:D6))
    Harley2

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)

  4. #4
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: sum product w/ multiple criteria

    Without too much arrays, you may employ a helper column like F on the attached.
    Attached Files Attached Files

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sum product w/ multiple criteria

    =Sumproduct(--(A1:A10,"cat"),--(B1:B10,"house"),C1:C10,D1:D10)

    add absolute referencing as needed and change ranges as needed.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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