+ Reply to Thread
Results 1 to 9 of 9

Sumifs formula returns ZERO

  1. #1
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Sumifs formula returns ZERO

    Why does this return "0"?

    =SUMIFS(B:B,A:A,998001,A:A,110450)
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Sumifs formula returns ZERO

    Because not both criteria are met

    Try this one (Enter with Ctrl + Shift + Enter keys)
    =SUM(IF($A:$A={110450,998001},B:B))

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Sumifs formula returns ZERO

    The conditions in SUMIFS are effectively ANDed together, for each cell in turn. So, A1 cannot be both 998001 AND 110450, and neither can A2, so it returns zero as there is nothing to add up.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Sumifs formula returns ZERO

    Quote Originally Posted by JieJenn View Post
    Because not both criteria are met

    Try this one (Enter with Ctrl + Shift + Enter keys)
    =SUM(IF($A:$A={110450,998001},B:B))

    Thanks, I understand the criteria now. I couldn't get your formula working.

    Is there an easier way than this --> =SUMIFS(B:B,A:A,998001)+SUMIFS(B:B,A:A,110450)

  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: Sumifs formula returns ZERO

    One way...

    =SUM(SUMIF(A:A,{998001,110450},B:B))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Sumifs formula returns ZERO

    Nice, thanks!

    I was just going to post this: =SUM(SUMIFS(B:B,A:A,{110450,998001}))

  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: Sumifs formula returns ZERO

    Yeah, that will also work.

  8. #8
    Registered User
    Join Date
    06-10-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Sumifs formula returns ZERO

    Quote Originally Posted by Xx7 View Post
    Nice, thanks!

    I was just going to post this: =SUM(SUMIFS(B:B,A:A,{110450,998001}))
    Hi just found this and it's very useful but can I add nother criteria range to that formula? Have been trying and have not yet managed it.

    Just worked it out:

    =SUM(SUMIFS(F17:F31,C17:C31,{"day","night"},G17:G31,{"perm"}))
    Last edited by kevvyb2003; 06-10-2013 at 12:53 PM.

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

    Re: Sumifs formula returns ZERO

    The forum owner prefers that you start your own thread rather than posting your question(s) in someone elses thread.

    Rule #2 of the forum rules:

    http://www.excelforum.com/forum-rule...rum-rules.html

+ 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