+ Reply to Thread
Results 1 to 3 of 3

Thread: SUMPRODUCT not working when adding 3rd criteria

  1. #1
    Registered User
    Join Date
    06-28-2011
    Location
    Kansas City, MO
    MS-Off Ver
    Excel 2007
    Posts
    1

    SUMPRODUCT not working when adding 3rd criteria

    I have a task spreadsheet where I'm trying to determine that 2 tasks are complete but the 3rd one isn't. I've written formulas (that are working) to determine how many of each individual tasks are complete. But when I want to see if Task A and Task B are complete, but not task C for a project I just get Zero. Note the project name has to be the same for each of the 3 tasks.

    Columns are
    Project Number (A), Task Name(E), Task Status(F) and Task Completion Date (G).

    Here is the formula

    =SUMPRODUCT(--(A4:A2685=A4:A2685)*((--($E$4:$E$2685="Document-NTP Checklist")*(--($F4:$F$2685="Complete")))*((--($E$4:$E$2685="Form-Entitlement Verification Form")*(--($F4:$F2685="Complete"))*((--(E4:E2685="Approval-ApprovalSDM")*(--(G4:G2685<>""))))))))

    Thank you!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,225

    Re: SUMPRODUCT not working when adding 3rd criteria

    First, you don't need to look twice for (--($F4:$F$2685="Complete")

    Also, it counts how many times is in E column at the same time: Document-NTP Checklist, Form-Entitlement Verification Form AND Approval-ApprovalSDM... Which is 0.

    You need to separate those criterias.

    But, since you using XL2007 you shhould rather use COUNTIFS formula:

    =COUNTIFS($E$4:$E$2685, "Document-NTP Checklist", $F4:$F$2685, "Complete", G4:G2685, "<>"&"")+COUNTIFS($E$4:$E$2685, "Form-Entitlement Verification Form", $F4:$F$2685, "Complete", G4:G2685, "<>"&"")+COUNTIFS($E$4:$E$2685, "Approval-ApprovalSDM", $F4:$F$2685, "Complete", G4:G2685, "<>"&"")

    If I made some mistake in the formula hope you'll figure it out...
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057

    Re: SUMPRODUCT not working when adding 3rd criteria

    The way I interpret this you are trying to count the number of different projects where task A is complete and task B is complete but task C is not.

    I think you need some helper cells

    lets assume you put the task names A, B and C in Y4, Y5 and Y6 respectively.

    Now put this formula in Z4 copied down to Z2685

    =IF(AND(COUNTIFS(A$4:A4,A4,E$4:E4,Y$4,F$4:F4, "Complete")*COUNTIFS(A$4:A4,A4,E$4:E4,Y$5,F$4:F4, "Complete")=1,F4="Complete",OR(E4=Y$4,E4=Y$5), COUNTIFS(A$4:A$2685,A4,E$4:E$2685,Y$6,F$4:F$2685, "Complete")=0),"x","")

    Now you just count the "x"s in column Z for the final result, i.e. in Y7

    =COUNTIF(Z4:Z2685,"x")
    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.2.0