+ Reply to Thread
Results 1 to 4 of 4

sumproduct error

Hybrid View

  1. #1
    Registered User
    Join Date
    02-20-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2010
    Posts
    74

    sumproduct error

    Hi, I really hope someone can help me solve this problem because it is driving me mad. I got it to work in a different workbook but now its not summing properly.

    My formula is as follows: =IFERROR(VLOOKUP($B20,$J$11:$O$45,HLOOKUP(CONCATENATE($K$6,$D$10),$L$1:$O$2,2,FALSE),FALSE),SUMPRODUCT(($B$11:$B$36="Other")*($L$11:$L$36))+SUMPRODUCT(($B$11:$B$36="")*($L$11:$L$36)))

    it is giving me a result of $39,680 but it should be giving me $40,073. I am attaching an example.

    Thanks in advance for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: sumproduct error

    Hi,

    The SUMPRODUCT in that cell is summing all values in L11:L36 for which the corresponding entry in B11:B36 is either blank or "Other". However, since cell B29 contains "GRAND TOTAL", the quantity in L29 (393.12) will be excluded from this summation, hence the discrepancy.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    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
    53,048

    Re: sumproduct error

    the 2nd part of your fomula (the sumproduct part) is based on data in B, but adding values in L. You have text 1/2 way down (Grand total) that matches neither criteria (other or ""), so the value on that row is being excluded.

    On a side note, instead of sumproduct, you could use the easier sumif() =SUMIF($B$11:$B$36,"Other",$L$11:$L$36)+SUMIF($B$11:$B$36,"",$L$11:$L$36), and you could also replace concatenate
    HLOOKUP(CONCATENATE("2012"&D$10),
    with
    HLOOKUP(K6&D$10,$L$1:$O$2,
    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

  4. #4
    Registered User
    Join Date
    02-20-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2010
    Posts
    74

    Re: sumproduct error

    I tried the IFERROR(VLOOKUP($B20,$J$11:$O$45,HLOOKUP(CONCATENATE($K$6,$D$10),$L$1:$O$2,2,FALSE),FALSE),SUMIF($B$11:$B$36,"Other",$L$11:$L$36)+SUMIF($B$11:$B$36,"",$L$11:$L$36)) but i still got the same answer. what am i doing wrong?

    Thanks,

+ 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