+ Reply to Thread
Results 1 to 8 of 8

sum if true and certain month

  1. #1
    Registered User
    Join Date
    02-10-2011
    Location
    Whitefish, Montana
    MS-Off Ver
    Excel 2011 for mac
    Posts
    16

    sum if true and certain month

    Can you please help me produce 200 as the answer for total of all deposits received for the month of January regardless of year? A received deposit being one that is true as in the example.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,926

    Re: sum if true and certain month

    Try this:

    =SUMPRODUCT((MONTH($B$2:$B$5)=1)*($C$2:$C$5))

    You seem to have 3 January dates in your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-10-2011
    Location
    Whitefish, Montana
    MS-Off Ver
    Excel 2011 for mac
    Posts
    16

    Re: sum if true and certain month

    Thanks for helping Ali. I need the formula to also consider if column A is True. That's why the total should only be 200 and not 300.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,926

    Re: sum if true and certain month

    That wasn't clear in your opening post.

    This, then:

    =SUMPRODUCT((MONTH($B$2:$B$5)=1)*($A$2:$A$5="TRUE")*($C$2:$C$5))

  5. #5
    Registered User
    Join Date
    02-10-2011
    Location
    Whitefish, Montana
    MS-Off Ver
    Excel 2011 for mac
    Posts
    16

    Re: sum if true and certain month

    That only produces 0 for me...

  6. #6
    Registered User
    Join Date
    02-10-2011
    Location
    Whitefish, Montana
    MS-Off Ver
    Excel 2011 for mac
    Posts
    16

    Re: sum if true and certain month

    oh, I got it! I changed ="TRUE" to >""

    Thank you Ali!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,926

    Re: sum if true and certain month

    Look:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    1
    Received Date Amount
    2
    True
    05/01/2019
    100
    3
    08/01/2019
    100
    4
    05/02/2020
    100
    5
    True
    08/01/2020
    100
    6
    7
    received in January
    200
    Sheet: Hoja1

    Excel 2016 (Windows) 32 bit
    C
    7
    =SUMPRODUCT((MONTH($B$2:$B$5)=1)*($A$2:$A$5="TRUE")*($C$2:$C$5))
    Sheet: Hoja1

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,926

    Re: sum if true and certain month

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. 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. Replies: 3
    Last Post: 12-14-2015, 02:28 AM
  2. Replies: 9
    Last Post: 10-08-2015, 01:50 PM
  3. Best logic to return TRUE in VBA if month NAMES are 1 apart?
    By dmasters4919 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2015, 10:47 AM
  4. EDATE function comparing dates returns true for same number month
    By jrodertogo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-04-2015, 04:19 AM
  5. Return True if date in cell is between a month and year in drop down comboboxes
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 05:18 AM
  6. Return True or False if date range falls within current month
    By kieran614 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2013, 12:02 PM
  7. Dynamic VBA Code for PivotItems, Visible = True for "Last Month" only
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2012, 09:43 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