+ Reply to Thread
Results 1 to 6 of 6

sumif ...month number db1 = month number db2

  1. #1
    Forum Contributor
    Join Date
    03-24-2014
    Location
    Lisboa, Portugal
    MS-Off Ver
    Office 365
    Posts
    177

    sumif ...month number db1 = month number db2

    Hi guys
    It seems i can't find the solution for this. Can you help me please?
    I would like to sum some values with 3 or 4 criterias. One of them, is the date.
    Instead of greater or equal than, and smaller or equal than a certain date, would be easier if i could put on the criteria the month number.
    I've attach a sample file
    Thanks in advance
    Best regards
    Pedro
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: sumif ...month number db1 = month number db2

    Hi,

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    will do it.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: sumif ...month number db1 = month number db2

    What's wrong with this in J3:

    =SUMIFS($F$4:$F$13,$E$4:$E$13,">="&I3,$E$4:$E$13,"<="&EOMONTH(I3,0))

    (you will probably need to change the commas ( , ) to semicolons ( ; ) and translate the function names).

    You can't manipulate the criteria ranges with SUMIFS - you would need to use SUMPRODUCT if you specifically wanted to use the month number, but then if you had some dates in a previous year you would have to include a parameter for the year, so you could do it like this:

    =SUMPRODUCT(--(TEXT($E$4:$E$13,"mmyy")=TEXT(I3,"mmyy")),$F$4:$F$13)

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    03-24-2014
    Location
    Lisboa, Portugal
    MS-Off Ver
    Office 365
    Posts
    177

    Re: sumif ...month number db1 = month number db2

    PErfect!! Tks a lot

  5. #5
    Forum Contributor
    Join Date
    03-24-2014
    Location
    Lisboa, Portugal
    MS-Off Ver
    Office 365
    Posts
    177

    Re: sumif ...month number db1 = month number db2

    Beautifull. Tks very much

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: sumif ...month number db1 = month number db2

    You're welcome - thanks for the rep.

    Pete

+ 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] Need to split 240 rows into an equal number, but that number may change month to month
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-17-2016, 04:15 PM
  2. Formula to give week number of a month according to date of the month
    By tukae in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2016, 11:14 PM
  3. Replies: 3
    Last Post: 07-14-2015, 12:26 PM
  4. Look up month number within code based on 3 character month?
    By MCunningham in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2013, 04:08 PM
  5. Count number of networkdays for each month in a multi month period
    By dreddster in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-10-2013, 11:12 AM
  6. Changing number of days in a month based on month chosen from a dropdown list.
    By st_judeu@yahoo.com in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-08-2013, 02:26 PM
  7. Replies: 3
    Last Post: 09-25-2007, 10:26 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