+ Reply to Thread
Results 1 to 10 of 10

multiple sumproduct criteria problem

  1. #1
    Registered User
    Join Date
    05-07-2009
    Location
    leeds, england
    MS-Off Ver
    Excel 2007
    Posts
    29

    multiple sumproduct criteria problem

    hello,
    im trying to use the following forumla to discover how many times a row in anyone one of the months sheets has "asbestos" column A, "1p" in column B, and "employee" in column AE.

    Please Login or Register  to view this content.
    Does anyone know why this is not working?

    Many thanks

    Richard

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: multiple sumproduct criteria problem

    What is the output you're getting ?

  3. #3
    Registered User
    Join Date
    05-07-2009
    Location
    leeds, england
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: multiple sumproduct criteria problem

    0.

    It’s not recognising when an entry fulfils the criteria

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: multiple sumproduct criteria problem

    I think we would need to see a dummy sample to investigate.

    Also, are you running XL2007 ? (as implied by your profile)

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

    Re: multiple sumproduct criteria problem

    Isn't ther esupposed to be SUMPRODUCT somewhere in the formula ( at the beginning and after each "+") ?

  6. #6
    Registered User
    Join Date
    05-07-2009
    Location
    leeds, england
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: multiple sumproduct criteria problem

    ok, I've a slight rethink! I've attached a dummy workbook.

    What I would like to do is: in cell b3, on the "asbestos" sheet, have a forumla that gives me something along the lines of:

    Please Login or Register  to view this content.
    Many thanks

    Rich
    Attached Files Attached Files

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: multiple sumproduct criteria problem

    Rich, I think you mean:

    =SUMPRODUCT((Incidents!$A$4:$A$500=$A$1)*(Incidents!$B$4:$B$500=B$2)*(Incidents!$C$4:$C$500>=$A3)*(Incidents!$C$4:$C$500<DATE(YEAR($A3),MONTH($A3)+1,1)))
    EDIT: In attachment the above is incorrect as final test is <= and should be <

    Note: in the above I've made the assertion that rather than typing "January" into A3 etc you've entered it as a date, ie 1/1/9 (format as "mmmm")

    If using XL2007 you could use COUNTIFS which will be more efficient...(note also used EDATE which is auto available in 2007 but requires Analysis ToolPak activation in earlier versions)

    =COUNTIFS(Incidents!$A$4:$A$500,$A$1,'Incidents'!$B$4:$B$500,B$2,Incidents!$C$4:$C$500,">="&$A3,Incidents!$C$4:$C$500,"<"&EDATE($A3,1))

    Better yet of course would be to use a Pivot Table given this is what you're duplicating
    Note: C56 on Incidents needed to be altered to become a date value - was/is text string

    See attached wherein all 3 approaches are outlined... in order of preference in terms of Long Term efficiency & Flexibility:

    1 - Pivot Table
    2 - COUNTIFS (XL2007 Exclusive)
    3 - SUMPRODUCT
    Attached Files Attached Files
    Last edited by DonkeyOte; 05-20-2009 at 06:13 AM.

  8. #8
    Registered User
    Join Date
    05-07-2009
    Location
    leeds, england
    MS-Off Ver
    Excel 2007
    Posts
    29

    Question Re: multiple sumproduct criteria problem

    Thanks for that, great stuff!

    I dont think a pivot table would be appropiate in this case, however, because the data is eventually going to printed.

    The sumproduct formulas you provided dont seem to show all the results. e.g. there should be 5 accidents in total: there is a 5p, 7p and 4p missing. I changed all the date values to dd/mm/yyyy format but still no joy.

    Any ideas?

    Many thanks

    Rich

  9. #9
    Registered User
    Join Date
    05-07-2009
    Location
    leeds, england
    MS-Off Ver
    Excel 2007
    Posts
    29

    Red face Re: multiple sumproduct criteria problem

    wait scrap that! have worked it out! was being a fool.

    thanks again for a great response

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: multiple sumproduct criteria problem

    The three you mention all occur in 2008... so the next question is are you looking to ignore by year - your initial formula did not imply as such..

+ 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