+ Reply to Thread
Results 1 to 10 of 10

Problem in sumproduct

  1. #1
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    43

    Question Problem in sumproduct

    i am having problem in sumproduct due to #N/A error in my data. file is attached
    i need help plz do the needful

    Regards
    Sajid
    Attached Files Attached Files
    Last edited by sajidbagi; 11-28-2011 at 04:06 PM. Reason: problem solved

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Problem in sumproduct

    Perhaps try using COUNTIFS, i.e.

    =COUNTIFS(A2:A10,D3,B2:B10,">=0")
    Audere est facere

  3. #3
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: Problem in sumproduct

    no i have to sum the values with given criterias

  4. #4
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Problem in sumproduct

    1 get rid of na
    like this

    =IF(ISNA(VLOOKUP(A2,$D$3:$E$5,2,FALSE)),0,VLOOKUP(A2,$D$3:$E$5,2,FALSE))
    2 the sum product can then be
    =SUMPRODUCT(--(A2:A10=D3),--(B2:B10>=0))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Problem in sumproduct

    Or, after taken care of the NA one way or another ( I'm not a big fan of the IF(ISNA...) technique) you can use a Pivot Table to summarize

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,406

    Re: Problem in sumproduct

    Use SUMIF if you want to SUM values:

    =SUMIF(A2:A10, D3, B2:B10)

  7. #7
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Problem in sumproduct

    Using your posted workbook...
    try this:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  8. #8
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Problem in sumproduct

    Or using an array formula:

    Please Login or Register  to view this content.
    confirm with Ctrl-Shift-Enter.

    Cheers,

  9. #9
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Problem in sumproduct

    oh and change your profile
    MS Office Version:Excel 2003

  10. #10
    Registered User
    Join Date
    07-16-2009
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: Problem in sumproduct

    Quote Originally Posted by Ron Coderre View Post
    Using your posted workbook...
    try this:
    Please Login or Register  to view this content.
    Is that something you can work with?

    thanks its working now

+ 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