+ Reply to Thread
Results 1 to 5 of 5

Sumproduct with month, year, other criteria, and blank

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

    Sumproduct with month, year, other criteria, and blank

    Hi all,

    I have problem with sumproduct please help me, I'm really stuck..

    My data is attached. I want to search coal ABC sum value based on the date on B5.

    My attempt: =SUMPRODUCT(($L$4:$L$13),($K$4:$K$13="ABC")*(MONTH($M$4:$M$13=B3))*(YEAR($M$4:$M$13=B4)*($M$4:$M$13<>"")))---> failed.

    Thanks in advance guys!
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sumproduct with month, year, other criteria, and blank

    You are missing a closing parenthesis in MONTH and YEAR. Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: Sumproduct with month, year, other criteria, and blank

    Not sure but try this :

    =SUMPRODUCT(($K$4:$K$13="ABC")*(DATE(YEAR($M$4:$M$13),MONTH($M$4:$M$13),1)=DATE(YEAR(B$5),MONTH(B$5),1))*($L$4:$L$13))

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

    Re: Sumproduct with month, year, other criteria, and blank

    welcome to the forum, bibbi. you have the brackets at the wrong places. try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and since you are checking for month in column M, you dont have to check if column M is blank.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    alternatively without MONTH & YEAR:
    =SUMPRODUCT($L$4:$L$13,($K$4:$K$13="ABC")*(TEXT($M$4:$M$13,"yyymm")=TEXT(B5,"yyymm")))

    or even faster with Excel 2007 & above:
    =SUMIFS($L:$L,$K:$K,"ABC",$M:$M,">="&B5,$M:$M,"<="&EOMONTH(B5,0))

    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

  5. #5
    Registered User
    Join Date
    10-25-2013
    Location
    ina
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sumproduct with month, year, other criteria, and blank

    Thank you all for the very quick replies, azumi, flameretired, and benishiryo!

    It solved my problem hehe.

+ 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. Replies: 18
    Last Post: 09-08-2014, 05:06 PM
  2. [SOLVED] Sumproduct from date - 4 criteria (inc month & year)
    By Knawl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-28-2014, 04:48 AM
  3. Using SUMPRODUCT For Two Criteria AND Month of Year.
    By stuu3270 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-16-2013, 06:22 AM
  4. [SOLVED] SUMPRODUCT, OR, Less than Month & Less than Year
    By JUGGAKNOTZZ in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-01-2013, 10:51 AM
  5. SumProduct error when using Year , Month and text criteria
    By jsrobin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-11-2008, 10:56 PM

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