+ Reply to Thread
Results 1 to 5 of 5

sumproduct+countifs+month year function does not work

  1. #1
    Registered User
    Join Date
    07-19-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    3

    sumproduct+countifs+month year function does not work

    i am trying to use this formula but it result 0 pls help me why it is not working

    =SUMPRODUCT(COUNTIFS(Sheet2!B:B,"1",Sheet2!M:M,"2",Sheet2!J:J,{"3","4","5","6","7","8","9","10"},Sheet2!AF:AF,{"1"})*--(MONTH(Sheet2!I:I)=MONTH(Sheet4!D$13))*--(YEAR(Sheet2!I:I)=YEAR(Sheet4!D$13)))

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: sumproduct+countifs+month year function does not work

    You can either use "*"(multiplication) or double unary "--".
    Try this
    =SUMPRODUCT(COUNTIFS(Sheet2!B:B,"1",Sheet2!M:M,"2",Sheet2!J:J,{"3","4","5","6","7","8","9","10"},Sheet2!AF:AF,{"1"}),--(MONTH(Sheet2!I:I)=MONTH(Sheet4!D$13)),--(YEAR(Sheet2!I:I)=YEAR(Sheet4!D$13)))
    Otherwise post your workbook
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,731

    Re: sumproduct+countifs+month year function does not work

    Your COUNTIFS function returns an 8 element array (8 because {"3","4","5","6","7","8","9","10"} has 8 elements) and then you are trying to combine that with whole column arrays for month and year so that won't work.

    Try doing the MONTH/YEAR part within the COUNTIF function by returning the start and end date of the month using EOMONTH, like this

    =SUMPRODUCT(COUNTIFS(Sheet2!B:B,1,Sheet2!M:M,2,Sheet2!J:J,{3,4,5,6,7,8,9,10},Sheet2!AF:AF,1,Sheet2!I:I,">="&EOMONTH(Sheet4!D$13,-1)+1,Sheet2!I:I,"<"&EOMONTH(Sheet4!D$13,0)+1))
    Audere est facere

  4. #4
    Registered User
    Join Date
    07-19-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: sumproduct+countifs+month year function does not work

    thanks dear

  5. #5
    Registered User
    Join Date
    07-19-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: sumproduct+countifs+month year function does not work

    =SUMPRODUCT(COUNTIFS(Sheet1!J:J,"2",Sheet1!K:K,"*",Sheet1!B:B,">="&EOMONTH(Sheet2!D11,-3)+1,Sheet1!B:B,"<"&EOMONTH(Sheet2!D11,0)+1)) it work perfectely, now i want add one more criteria to it, i want that its count the value only in Jan., April, July and October only mean that only at the end of quarter only

+ 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. Countifs month and year match
    By jakeisbill in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2013, 03:17 AM
  2. [SOLVED] SUMPRODUCT or COUNTIFS to Return Sum of Numbers Meeting Year and Part Number?
    By d_striker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2013, 04:01 PM
  3. [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
  4. Can Countifs and Sumproduct work together?
    By KSChan in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 11-02-2012, 07:13 AM
  5. Sumproduct with month and year ???
    By jpeirano in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2011, 09:07 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