+ Reply to Thread
Results 1 to 15 of 15

sum values if date matches a condition

Hybrid View

  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    Certaldo, Italy
    MS-Off Ver
    Excel 2010
    Posts
    6

    sum values if date matches a condition

    Hallo; I am using excel 2010
    in a sheet, in column A I have dates, in column B description, in column C amounts (i.e. A1 nov 13th 2012; B1 alan; C1 100; A2 sept 12th 2013; B2 philip;C2 300; and so on)
    I want to sum amounts of column C IF B satisfies a condition (e.g. =alan) and date satisfies another condition (e.g. after jan 1st 2013, or after today)
    I tried some functions, but it does not work
    any suggestion?
    thank You all

    Roberto

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,714

    Re: sum values if date matches a condition

    Look at using the =SumIfs function. Look at this link for the syntax.

    http://www.techonthenet.com/excel/formulas/sumifs.php
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: sum values if date matches a condition

    Welcome to the forum..

    I doubt.. "Nov 13th 2012" is a Date..

    try again yourself.. by converting them to actual date.. or
    upload a sample for us..

    To upload.. "go Advance" and click the Clip Icon to upload a file..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Registered User
    Join Date
    09-10-2013
    Location
    Certaldo, Italy
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: sum values if date matches a condition

    probl excel.jpg
    here is the example...

    thanks

  5. #5
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: sum values if date matches a condition

    Something like this:

    =SUMIFS(C1:C5;A1:A5;TODAY();B1:B5;"alan")

    maybe my semicolon should be a comma for you
    When I say semicolon, u say comma!

  6. #6
    Registered User
    Join Date
    09-10-2013
    Location
    Certaldo, Italy
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: sum values if date matches a condition

    Quote Originally Posted by L-Drr View Post
    Something like this:

    =SUMIFS(C1:C5;A1:A5;TODAY();B1:B5;"alan")

    maybe my semicolon should be a comma for you
    thank, but it works only if date matches TODAY, not before or after today, that is what I need
    if I write
    SUMIFS(C1:C5;A1:A5;>TODAY();B1:B5;"alan") I get a message of mistake

    thanks all

  7. #7
    Registered User
    Join Date
    09-10-2013
    Location
    Certaldo, Italy
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: sum values if date matches a condition

    thank, but it work only if date matches today, not before or after today
    probl excel.jpg
    here You can see the formula and the mistake....
    thanks

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,714

    Re: sum values if date matches a condition

    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

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,714

    Re: sum values if date matches a condition

    The problem with pictures is that they don't show formatting. They don't allow those wishing to respond to see what the characteristics of your spreadsheet and lastly it takes time to re-create your spreadsheet. We are all volunteers here with limited amount of time to help as we all have full time employment (well most do). Please attach a spreadsheet that can be worked on directly.

  10. #10
    Registered User
    Join Date
    09-10-2013
    Location
    Certaldo, Italy
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: sum values if date matches a condition

    sorry for that; I thought the screenshot was OK.....
    here is the sheet; and thanks again
    prova.xlsx

    Roberto

  11. #11
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: sum values if date matches a condition

    Unfortunately I don't know how to implement checking for such criteria in a SUMIFS.
    I do know you should remove the second = from your formula. That's one factor causing the error, I think.

  12. #12
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: sum values if date matches a condition

    Make the criteria ">"&today().

    For example: =SUMIFS(C2:C7,A2:A7,">"&TODAY(),D2:D7,"A")

  13. #13
    Registered User
    Join Date
    09-10-2013
    Location
    Certaldo, Italy
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: sum values if date matches a condition

    It works
    Thanks a lot

    Roberto

  14. #14
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: sum values if date matches a condition

    Quote Originally Posted by OllyXLS View Post
    Make the criteria ">"&today().
    Awesome, I'll remember that one. Don't know how many times I have used workaround-formulas for this

  15. #15
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,714

    Re: sum values if date matches a condition

    Roberto,

    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. Count Unique Discrete Values for specified date and given condition
    By JAUrrutia9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-03-2013, 03:15 PM
  2. Search named range for multiple matches to critera and return date & values
    By a.mack123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-18-2011, 10:07 AM
  3. Transfer Values Based On Condition & Insert Date : PT B
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2009, 06:11 PM
  4. Transfer Values Based On Condition & Insert Date
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2009, 12:30 PM
  5. [SOLVED] How do you count data that matches more than one condition?
    By ryesworld in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-08-2005, 09:00 PM

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