+ Reply to Thread
Results 1 to 6 of 6

Sumifs error while using month function.

  1. #1
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Sumifs error while using month function.

    Hi Friends,

    I have a spreadsheet with three columns in it....Column A: Date, Column B: Sales Rep and Column C: Sale.
    I am trying to use sumifs to find out the total sale of a particular sales rep (first criteria) on monthly basis. Column A: Date is filled with dates with custom date format dd/mm/yyyy. I also have a named range MothsList on my worksheet having months name (January,February......,December) with corresponding month number (1,2......12). I am using the below formula and getting error........

    =SUMIFS(C2:C12,B2:B12,E2,MONTH(A2:A12),VLOOKUP(F2,MothsList,2))

    here E2 is the criteria for sales rep and F2 is the criteria for month name and here is the formula evaluation with F9


    =SUMIFS({213254;213545;21546;45621;85462;21654;745613;2168462;124657;142546;254652},{"A";"B";"A";"C";"A";"B";"A";"C";"A";"B";"C"},"A",{1;1;1;1;1;1;1;2;2;2;2},VLOOKUP("January",{"January",1;"February",2;"March",3;"April",4;"May",5;"June",6;"July",7;"August",8;"September",9;"October",10;"November",11;"December",12},2))

    Everything seem to be correct but I am unable to enter the formula. Any suggestions ?

    Please help.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-23-2013
    Location
    Abu Dhabi United Arab Emirates
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Sumifs error while using month function.

    try this
    =SUMPRODUCT((Sales_Reps=E2)*(MONTH(Dates)=VLOOKUP(F2,MothsList,2,FALSE)),C2:C12)

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Sumifs error while using month function.

    Thanks acerrhod ! for your reply.
    sumproduct() works well with the given scenario but I only wanted to know that what went wrong with the formula using sumifs(). Is there any correction I need to make in the sumifs() formula to get the desired output ?
    In excel you can achieve the same task by using multiple available functions, but here the challenge is to use sumifs() with the given scenario.
    Its the matter of curiosity that why my formula is not working ?

    Thanks.

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Sumifs error while using month function.

    SUMIF(S) will not accept static array for the 'sum_range' or 'criteria_range' argument; actual 'single-column' cell range is required to be provided. 'criteria' argument, however, does not have that constraint. same thing for COUNTIF(S).
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Sumifs error while using month function.

    try

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Sumifs error while using month function.

    Try

    =SUMIFS(C2:C12,B2:B12,E2,Dates,">=" &DATE(2013,MONTH($F$2&0),1),Dates,"<=" &EOMONTH(DATE(2013,MONTH($F$2&0),1),0))

+ 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