+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT help?

  1. #1
    Registered User
    Join Date
    07-21-2011
    Location
    U.S.
    MS-Off Ver
    Excel 2010
    Posts
    4

    SUMPRODUCT help?

    Might be a dumb question, but here goes:

    I'm trying to sum the product of the values in Column E and F (units and price) but only if two conditions exist...
    • If Cell B is Empty (signaling the order is open)
    • Cell C is the name of the product

    Anyway here's a few codes that I've tried:
    =SUMPRODUCT(--(B:B=""),--(C:C="AAPL"),F:F*E:E)
    It just gives me the #VALUE! ...If I remove the *EE then it gives me just the sum...So Help!

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: SUMPRODUCT help?

    Do your columns have text headers? If there are non-numerics in columns E or F then your formula will return that error because you are using the * operator.

    SUMPRODUCT is an expensive function, so it's really best to minimize the size of the ranges passed into it. Also note (not relevant to you) that you can't use entire column references pre XL 2007.

    Here's a revised formula which excludes the header row, and will not error if there are text values in columns E or F.

    =SUMPRODUCT(--(B2:B1000=""),--(C2:C1000="AAPL"),F2:F1000,E2:E1000)
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: SUMPRODUCT help?

    You should also be able to just replace the * with a ,
    Unless the values in E are recorded as text and need to be coerced into being viewed as numbers.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    07-21-2011
    Location
    U.S.
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: SUMPRODUCT help?

    Yep, that pretty much did it. Thanks for the help guys!

  5. #5
    Registered User
    Join Date
    06-17-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    42

    Re: SUMPRODUCT help?

    Try this =SUMPRODUCT((B2:B8="")*(C2:C8="APPL")*(E2:E8)*(F2:F8)). Is it correct? If you upload your file and give example of your expected results, then it should be easier.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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