+ Reply to Thread
Results 1 to 17 of 17

Why sumproduct formula return result 0

  1. #1
    Registered User
    Join Date
    05-17-2012
    Location
    Kosova
    MS-Off Ver
    Excel 2007
    Posts
    6

    Why sumproduct formula return result 0

    HI..IM NEW IN THIS FORUM AND IN EXCEL GENERALY

    I have a little problem with sumproduct formula in excel 2007...
    =SUMPRODUCT(F4:F35=B82,G4:G35=F98,J4:J35) and i get the 0 result

    but when i put manualy this formula i get the proper result
    =SUMPRODUCT((F4:F35=B82)*(G4:G35=F98)*(J4:J35))

    my colums are TEXT ---TEXT---NUMBER

    so is there a way not to do this manualy ?!

    THNX
    Last edited by zbor; 05-18-2012 at 04:01 PM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumproduct

    Hi and welcome to the forum.

    What you mean "..when i put manualy this formula i get .."

    This is the corect type for the SUMPRODUCT function..

    =SUMPRODUCT((F4:F35=B82)*(G4:G35=F98)*(J4:J35))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    05-17-2012
    Location
    Kosova
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sumproduct

    this is what i get when i use array1 array2 and array3
    =SUMPRODUCT(F4:F35=B82,G4:G35=F98,J4:J35) and the result is 0 instead of another number
    so then i go to formula bar and improve the formula
    =SUMPRODUCT((F4:F35=B82)*(G4:G35=F98)*(J4:J35))
    my question and confusion is why i get commas , instead of multiplication*

    sorry for my english

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

    Re: Sumproduct

    ARIA1,


    Forum Rules
    Please read and adhere to these simple rules!

    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more days have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sumproduct

    Quote Originally Posted by ARIA1 View Post
    HI..IM NEW IN THIS FORUM AND IN EXCEL GENERALY

    I have a little problem with sumproduct formula in excel 2007...
    =SUMPRODUCT(F4:F35=B82,G4:G35=F98,J4:J35) and i get the 0 result

    but when i put manualy this formula i get the proper result
    =SUMPRODUCT((F4:F35=B82)*(G4:G35=F98)*(J4:J35))

    my colums are TEXT ---TEXT---NUMBER

    so is there a way not to do this manualy ?!

    THNX
    Since you're using Excel 2007 you can use the SUMIFS function...

    =SUMIFS(J4:J35,F4:F35,B82,G4:G35,F98)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: Sumproduct

    Tony, please read forum rules:

    7. Don't ignore requests by Administrators, Moderators, or senior members of the forum. If you are unclear about their request or instructions, then send a private message to them asking for help. Do not post a reply in a thread where such a request (e.g., title change, code tags) is pending.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sumproduct

    Quote Originally Posted by zbor View Post
    Tony, please read forum rules:

    7. Don't ignore requests by Administrators, Moderators, or senior members of the forum. If you are unclear about their request or instructions, then send a private message to them asking for help. Do not post a reply in a thread where such a request (e.g., title change, code tags) is pending.
    This message has been deleted by zbor.
    Are you serious?

    I'm outta here!

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

    Re: Sumproduct

    Unfortunately I have a bad sense of humor

  9. #9
    Registered User
    Join Date
    05-17-2012
    Location
    Kosova
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sumproduct

    is there any answer for my problem !?!?

    =SUMPRODUCT(F4:F35=B82,G4:G35=F98,J4:J35)

    =SUMPRODUCT((F4:F35=B82)*(G4:G35=F98)*(J4:J35))

    my question and confusion is why i get commas , instead of multiplication*

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Sumproduct

    Although I personally don't see any problem with your title Zbor, a forum moderator, has asked you, in post #4, to change it. Everyone else is now prevented from answering you until you comply with that request.

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

    Re: Sumproduct

    From mine point of view it's a formula name. Like naming a thread: IF.
    As per the rules it should describe a problem.

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Sumproduct

    You're going to be very busy then. How many threads are there that just say: Countif or Sumif or Conditional Formatting or Pivot Table etc.

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

    Re: Why sumproduct formula return result 0

    And there would be much more if we don't interfere. But here, I've change a title so this saga can end.

    @ARIA1:
    SUMPRODUCT formula: =SUMPRODUCT(A1:A4>0) will return you a 0 even if all values in range are greater than 0.
    That's because, if you evaluate formula you will get: =SUMPRODUCT({TRUE,FALSE,TRUE,TRUE})
    Since they are all text values SUMPRODUCT formula ignore them and final result is 0.

    To get propper result you need to convert those TRUE/FALSE values into numbers (1/0).
    And that you can do either by multiply by a number (for example 1), or with double unary -- or something else.

    In =SUMPRODUCT(1*(A1:A4>0)) will return you result 3 (if there were three values greater than zero) and that's what you did in second formula so that's the reason you get desired result.
    Because:
    =SUMPRODUCT(1*(A1:A4>0))
    =SUMPRODUCT(1*(TRUE,FALSE,TRUE,TRUE))
    =SUMPRODUCT({1,0,1,1})
    =3

  14. #14
    Registered User
    Join Date
    05-17-2012
    Location
    Kosova
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Why sumproduct formula return result 0

    Thnx,zbor...i will try it..sorry for the mess about the title..

  15. #15
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Why sumproduct formula return result 0

    I think the problem you are facing is your data type
    Try using the unary operators
    Please Login or Register  to view this content.
    This forces TRUE, FALSE to 1, 0 then the formula can multiply the sums.

    If you use this form of the formula ...
    Please Login or Register  to view this content.
    TRUE and FALSE are automatically calculated (forced) as 1, 0
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  16. #16
    Registered User
    Join Date
    05-17-2012
    Location
    Kosova
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Why sumproduct formula return result 0

    Do i need every time to correct the formula >!

  17. #17
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Why sumproduct formula return result 0

    Quote Originally Posted by ARIA1 View Post
    Do i need every time to correct the formula >!
    Hello ARIA1, I'm not sure what you mean by that comment, if you use the formula that Marcol suggests then it should work...then you can use that formula every time.

    In Excel 2007 you might prefer to use SUMIFS, i.e.

    =SUMIFS(J4:J35,F4:F35,B82,G4:G35,F98)
    Audere est facere

+ 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