+ Reply to Thread
Results 1 to 9 of 9

SUMIF month equals today's month

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    24

    SUMIF month equals today's month

    I am trying to SUM a range IF the month of another range equals today's month. The formula I am trying, which doesnt work, is

    =SUM(IF(MONTH(K:K)=MONTH(TODAY()),J:J,0))

    Any ideas? Thanks!

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: SUMIF month equals today's month

    =sumproduct(--(month(k1:k100)=month(today())),j1:j100)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: SUMIF month equals today's month

    Have you committed the formula with Ctrl+Shift+Enter ? ( array formula)

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: SUMIF month equals today's month

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Ben Van Johnson

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: SUMIF month equals today's month

    maybe try adding a helper column to extract the month number, and then base the sumif() on that?

    OR if you have 2007 and later, use the sumifS() function...
    =SUMIFS($B$2:$B$16,$C$2:$C$16,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),$C$2:$C$16,"<="&DATE(YEAR(TODAY()),MONTH(TODAY())+1,-1))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    01-09-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: SUMIF month equals today's month

    Thanks Ace, but a simple copy/paste of that formula doesn't work and I am not sure how to fix it. Thanks, also, Pepe Le mokko but hitting Ctrl+Shift+Enter within my current formula turns the result from a "0" to a VALUE error.

    ProtonLeah, I have attached the example. Of course, my real file is much more extensive or I would not bother automating it. My goal is for the "Checks to be received" formula to find all checks with the current month's date and SUM them. Thanks for the help!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-09-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: SUMIF month equals today's month

    Nevermind, FDibbins nailed it. Thanks!

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SUMIF month equals today's month

    Quote Originally Posted by FDibbins View Post
    =SUMIFS($B$2:$B$16,$C$2:$C$16,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),$C$2:$C$16,"<="&DATE(YEAR(TODAY()),MONTH(TODAY())+1,-1))
    This won't work in all cases because this part

    DATE(YEAR(TODAY()),MONTH(TODAY())+1,-1)

    gives you the day before the end of the month (e.g. this month it gives 30th August not 31st). You need a zero in place of the -1

    You might find it simpler to use EOMONTH function like this

    =SUMIFS($B$2:$B$16,$C$2:$C$16,">="&EOMONTH(TODAY(),-1)+1,$C$2:$C$16,"<"&EOMONTH(TODAY(),0)+1)
    Audere est facere

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: SUMIF month equals today's month

    lol I knew there was an easier way as I was putting that together, but the light didnt come on...thanks )

+ 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. average values if month equals?
    By joshepting in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-21-2014, 05:02 PM
  2. Get number of rows where month equals X AND where other criteria match
    By torshen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-01-2013, 10:48 AM
  3. [SOLVED] display cell to show only Month/year to do sumif calc if today()= any day of month
    By fireguy7 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-12-2013, 06:55 PM
  4. count if ... # of next month or last month help from today
    By lightkeeper in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-13-2010, 03:09 PM
  5. Add up multiple columns if month+year equals
    By Heinrix in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-06-2010, 11:38 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