+ Reply to Thread
Results 1 to 3 of 3

SUMPRODUCT using a condition

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    SUMPRODUCT using a condition

    Hi,

    I would like to create a formula in D7 that calculates the weighted average growth for products (column A) manufactured by Bob (column B). In J5 I’ve inserted the expected result using a SUMPRODUCT function.

    Can someone please tell me how to create a formula in D7 that will calculate from the data in B6:D6 the same result as in J5. i.e. How do I make the SUMPRODUCT function only consider data in columns C and D when Bob is the manufacturer?

    Thanks very much!
    Attached Files Attached Files

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: SUMPRODUCT using a condition

    Directly, it's pretty simple.

    =SUMPRODUCT(range1, range2, --(range3="Bob") )

    range3 will return a boolean TRUE/FALSE for each element that's the same as text string "Bob" or not, and the --() forces it into a number 1/0 instead; so it multiplies rows where it is Bob by 1 and rows where it isn't by 0.

    However, I don't quite understand what you'e trying to do with the weighting; are you trying to make it a function of just that person?

    In that case I would probably create a dummy column for "Weight (%) (Individual Staff)" like this:
    =C3/SUMPRODUCT($C$3:$C$6,--($B$3:$B$6=B3))

    and then use that in the weighting range.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: SUMPRODUCT using a condition

    This appears to do what you want without adding helper columns. This formula uses ARRAY CONSTANTS to combine the multiple criteria in columns A and B to be applied to columns C and D.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. Sumproduct given a condition
    By pickslides in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2014, 12:03 AM
  2. Replies: 1
    Last Post: 05-19-2012, 02:54 AM
  3. sumproduct with condition
    By fabdav in forum Excel General
    Replies: 2
    Last Post: 01-18-2012, 06:35 PM
  4. Sumproduct with if and or condition
    By Diddy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-19-2011, 02:27 PM
  5. Sumproduct with condition???
    By neda5 in forum Excel General
    Replies: 5
    Last Post: 12-13-2005, 10:15 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