+ Reply to Thread
Results 1 to 8 of 8

Sumproduct of Multiple Conditinal Criteria with Dates

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    RIYADH
    MS-Off Ver
    Excel 2007
    Posts
    98

    Sumproduct of Multiple Conditinal Criteria with Dates

    Dear,

    I need to get the Sumproduct of two columns based on multiple conditions which relates to other columns one of which includes date also. I have attached the file for your reference. I need to the sumproduct of Columns "C & D", for those rows where :

    Column A - Not Equal to "B"
    Column B - Not Equal to "A"
    Column D - Qty greater than Zero
    Column E - Date Earlier than 01/01/2003
    Column F - Not Equal to "D"
    Column G - Not Equal to "C"
    Column H - Blank Cells
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Sumproduct of Multiple Conditinal Criteria with Dates

    For unit price:

    =SUMPRODUCT(($A$2:$A$21<>"B")*(($B$2:$B$21<>"A")*($E$2:$E$21<"1/1/2003")*(($F$2:$F$21<>"D")*(($G$2:$G$21<>"C")*(($H$2:$H$21="")*(C2:C21))))))

    For Qty:

    =SUMPRODUCT(($A$2:$A$21<>"B")*(($B$2:$B$21<>"A")*($E$2:$E$21<"1/1/2003")*(($F$2:$F$21<>"D")*(($G$2:$G$21<>"C")*(($H$2:$H$21="")*(D2:D21>0))))))

    If qty is has to be part for of the calculation then

    =SUMPRODUCT(($A$2:$A$21<>"B")*(($B$2:$B$21<>"A")*($E$2:$E$21<"1/1/2003")*(($F$2:$F$21<>"D")*(($G$2:$G$21<>"C")*(($H$2:$H$21="")*(C2:C21))))))
    Last edited by AlKey; 10-22-2013 at 09:29 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Sumproduct of Multiple Conditinal Criteria with Dates

    Or all in one formula (i.e. unit price * quantity where criteria are met)

    =SUMPRODUCT((A2:A21<>"B")*(B2:B21<>"A")*(D2:D21>0)*(E2:E21<DATE(2003,1,1))*(F2:F21<>"D")*(G2:G21<>"C")*(H2:H21=""),C2:C21*D2:D21)

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Sumproduct of Multiple Conditinal Criteria with Dates

    DELETED: Forum double posted my reply.
    Last edited by BadlySpelledBuoy; 10-22-2013 at 09:01 AM.

  5. #5
    Registered User
    Join Date
    12-20-2011
    Location
    RIYADH
    MS-Off Ver
    Excel 2007
    Posts
    98

    Re: Sumproduct of Multiple Conditinal Criteria with Dates

    Thanks a lot guys for the reply. But I was trying to do the same thing with the following formula, please tell me why it will not give me the same result:

    =SUMPRODUCT(--(A2:A21<>"B"),--(B2:B21<>"A"),--(D2:D21>0),--(E2:E21<"01/01/2003"),--(F2:F21<>"D"),--(G2:G21<>"C"),--(H2:H21=""),(C2:C21),(D2:D21))

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Sumproduct of Multiple Conditinal Criteria with Dates

    What result does that formula give you?
    What result were you expecting?

    I've just tried and it gives me the same result as my formula did, and from your original post it seems that's the result you require.

  7. #7
    Registered User
    Join Date
    12-20-2011
    Location
    RIYADH
    MS-Off Ver
    Excel 2007
    Posts
    98

    Re: Sumproduct of Multiple Conditinal Criteria with Dates

    If i want to exclude "B" & "C" in Column "A",how should we amend the Formula ?

    rGRDS.

  8. #8
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Sumproduct of Multiple Conditinal Criteria with Dates

    hi suhabthan. for us to assist you better, i suggest you read our questions & answer them. this is what BadlySpelledBuoy asked in post #6

    Quote Originally Posted by BadlySpelledBuoy View Post
    What result does that formula give you?
    What result were you expecting?

    I've just tried and it gives me the same result as my formula did, and from your original post it seems that's the result you require.
    your formula seems to be correct too. but you can remove some unnecessary brackets & try not to use a date with slashes like that. if a computer's regional settings is in DMY, it reads 1/2/2003 as 1Feb2003. with MDY, it'll be 2Jan2003. so use BadlySpelledBuoy's DATE method or spell month in 3 letters:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and since you came up with that formula, you probably know how to insert 1 more criteria field?
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sumproduct in between dates muliple criteria
    By nickmessick1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-25-2013, 06:04 PM
  2. [SOLVED] Sum (SUMPRODUCT), with various criteria. (dates)
    By marreco in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-05-2013, 09:15 PM
  3. Replies: 5
    Last Post: 04-20-2012, 08:54 AM
  4. Using sumproduct to sum networkdays between dates with criteria?
    By cheesysocks in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-28-2008, 01:51 PM
  5. hlookup and multiple criteria sumproduct to analyze text and dates
    By cdl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-05-2008, 09:12 AM

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