+ Reply to Thread
Results 1 to 15 of 15

Sumifs with several criteria, when I add dates criteria the sum goes to 0

  1. #1
    Registered User
    Join Date
    11-16-2023
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2010
    Posts
    6

    Sumifs with several criteria, when I add dates criteria the sum goes to 0

    I have a sumifs with several criteria. They sum fine but when I add the dates criteria, it all goes to 0. I'm adding something like this to the criteria options $E$2:$E$39654,"<"&E2,$E$2:$E$39654,"=>"&E2-365). Column E is the dates column.

    I expect non-zero sums(all non specific time ranges add fine). Any idea what might be the issue.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    Welcome to the forum.


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    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,916

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    I'm guessing that the dates are text masquerading as dates. Attach a sample workbook. Are you still using Excel 2010?
    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.

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

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    I think your last criteria should be this:

    $E$2:$E$39654,">="&E2-365

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    11-16-2023
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2010
    Posts
    6

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    I attached a sample. I expect cell J2 to be 135 but it's 57. Thanks for the responses
    Attached Files Attached Files

  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,209

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    2 different value for column A: A2="Hard" whereas A6 (E match) is "Grass"
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    A2 and A6 are different surfaces so that is not a match. Hence 57, not 135.

  8. #8
    Registered User
    Join Date
    11-16-2023
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2010
    Posts
    6

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    Thanks for the responses. I figured it out.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    You're welcome.


    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  10. #10
    Registered User
    Join Date
    11-16-2023
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2010
    Posts
    6

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    Not so quick... I don't understand why there is such a stark difference between column J and column K. In Column J, the formula does not seem to be covering the whole data for the year. I've attached a new sheet.
    Attached Files Attached Files

  11. #11
    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,209

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    Try

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    11-16-2023
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2010
    Posts
    6

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    Quote Originally Posted by JohnTopley View Post
    Try

    Please Login or Register  to view this content.
    I don't think this helps. The winner is sometimes a loser but the id stays the same.

  13. #13
    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,209

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    Please give examples of results you think are incorrect as a small sample I checked appear OK..

  14. #14
    Registered User
    Join Date
    11-16-2023
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2010
    Posts
    6

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    You can check for id - 201523, you will find that there are only two entries => one row when 201523
    is the winner and one row when 201523 is the loser. For the later date the sum(1/8/2007) will be 57 + 39 = 96 while for the earlier date, it will be just 57. Either way it's not 117 as your solution suggest.

    I don't understand the intuition behind the formula. Can you verbalize what you are trying to do?

  15. #15
    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,209

    Re: Sumifs with several criteria, when I add dates criteria the sum goes to 0

    YOUR formula returns 96 so why the post saying there are "stark" differences (post #10) ?

    Ignore my post as this was due to my mis-understanding of what you required..

+ 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. SUMIFS - Multiple criteria and dates
    By d0288 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-18-2020, 07:23 AM
  2. Sumifs between two dates - multiple criteria
    By mmaya4 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-05-2016, 07:50 PM
  3. SUMIFS using consectuvie dates as a criteria
    By Nadine67 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-10-2016, 05:59 PM
  4. Replies: 5
    Last Post: 03-30-2016, 06:01 AM
  5. Sumifs (criteria between two dates)
    By Arcanus in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-13-2013, 02:16 PM
  6. Sumifs with dates as criteria
    By MARKSTRO in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-19-2013, 05:58 PM
  7. SUMIFS, problem with Dates as Criteria
    By GMANFG in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2009, 01:15 PM

Tags for this Thread

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