+ Reply to Thread
Results 1 to 9 of 9

SUM Value Between Dates

  1. #1
    Registered User
    Join Date
    03-23-2017
    Location
    Northern Ireland
    MS-Off Ver
    Various
    Posts
    28

    SUM Value Between Dates

    So I have the following Table

    Columns
    A | B | C | D
    Line # | From Date | To Date | Days Worked

    I want to create a formula to the side that allows me to sum the days worked between any 2 dates. I've been trying it with this with no luck. K8 is the start date I want to use for my query and L8 is the end date. This formula is to show total days worked.

    =SUMIFS(D:D,C:C,">=K8",D:D,"<=L8")
    Attached Files Attached Files
    Last edited by Custhasno; 01-14-2025 at 05:26 AM. Reason: attaching example file

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,775

    Re: SUM Value Between Dates

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

  3. #3
    Registered User
    Join Date
    03-23-2017
    Location
    Northern Ireland
    MS-Off Ver
    Various
    Posts
    28

    Re: SUM Value Between Dates

    No change, it is simply display 0 in the output, i have include a screen shot. Not sure if SUMIFS is even the correct way to go, but I need to be able to quickly check a range of date for total days worked

    Attachment 886685

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,775

    Re: SUM Value Between Dates

    The attachment comes back as invalid, can you post a workbook that shows the problem.

  5. #5
    Registered User
    Join Date
    03-23-2017
    Location
    Northern Ireland
    MS-Off Ver
    Various
    Posts
    28

    Re: SUM Value Between Dates

    Sorry had to finish up for yesterday, file attached now.

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

    Re: SUM Value Between Dates

    You have two "space" characters at the end of the dates in columns C and D, so these are forcing the dates to be text values rather than proper dates. One of the space characters is the "normal" space, with a code of 32, but the other one is the non-breaking space character which has a code of 160.

    You can get rid of them in one operation by selecting those two columns and using Find & Replace (Ctrl-H):

    Find What: Alt-0160space

    Replace with: leave blank

    Then click Replace All

    where Alt-0160space means to hold down the Alt key and type 0160 on the numeric keypad and follow it with a normal space character. Alternatively, you could copy those two characters from the end of one of the dates and paste them in to that field.

    You should get the result shown in cell M4 of 18 days.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    03-23-2017
    Location
    Northern Ireland
    MS-Off Ver
    Various
    Posts
    28

    Re: SUM Value Between Dates

    Thanks, the actual data that gets imported is 01/03/1994 am. So i did the Find replace to remove the am and it wouldn't do it without a space being left. Ill use your advice to sort the issue at the source. Thanks

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

    Re: SUM Value Between Dates

    Are you still using Excel 2010? If not, please update your profile.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 each of those who offered help.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

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

    Re: SUM Value Between Dates

    If you copy/paste data in from the internet you often get the non-breaking space character between columns as html uses that character quite extensively to maintain the look of tabular data.

    Anyway, if that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    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. Replies: 8
    Last Post: 07-20-2018, 11:52 AM
  2. Populating list of dates from another sheet with Start Dates and End Dates
    By Jesshloly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2015, 04:07 AM
  3. Check dates in range either same dates or different dates by formula
    By breadwinner in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2013, 07:42 AM
  4. Replies: 6
    Last Post: 03-11-2013, 06:11 PM
  5. [SOLVED] Array of dates when tested shows no dates ......but there are dates
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2012, 12:45 PM
  6. [SOLVED] Highlight Group of Dates if Dates Match List of other Dates
    By martinpgibson in forum Excel General
    Replies: 5
    Last Post: 10-24-2012, 08:14 PM
  7. [SOLVED] Auto filling dates based on previously entered dates and averaging numbers if dates equal
    By grambograham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 03:21 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