+ Reply to Thread
Results 1 to 15 of 15

Counting the number of days overdue based on date and time

  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Counting the number of days overdue based on date and time

    I have the following:

    A1 = Date item is due. (DD/MM/YY format)
    A2 = Time the item was delivered (HH:MM:SS format)

    B1 = Actual Date item was delivered.
    B2 = Actual Time item was delivered.

    I'd like C1 to count the number of days the item was late. - taking into account that 16:00:00 is the deadline on each date.

    For example:

    Due Date: 17/06/14 @ 16:00:00

    Arrival Date: 17/06/14 @ 16:01:00

    Days Late = 1
    Due Date: 17/06/14 @ 16:00:00

    Arrival Date: 18/06/14 @ 15:00:00

    Days Late = 1
    Due Date: 17/06/14 @ 16:00:00

    Arrival Date: 18/06/14 @ 16:01:00

    Days Late = 2
    Could anyone help? Thanks
    Last edited by Barking_Mad; 06-19-2014 at 10:14 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Counting the number of days overdue based on date and time

    You should test some more values as this may not work for all cases but try this:

    =INT((B1+B2)-(A1+A2))+1
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    Hi,

    Thanks that works fine. Any ideas what sort of situations might exist when it wouldn't work?

    One more provision ive just realized id like to add:


    B3 contains a date of an extension to the original due date in B1. If there is a date in B3, this should be used instead of B1....That make sense?

    Thanks kindly

  4. #4
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    Any help with the above would be appreciated.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting the number of days overdue based on date and time

    Hi

    Do you mean?..
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  6. #6
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    Hi Fotis,

    Thanks for your help. The problem is that at some point in that calculation, the Extension date (B3) needs to taken away from the actual submission date (B1) to see if the item is still late after the extension.

    For instance:

    A1 = Original Submission Due Date: 18/06/14
    A2 = Original Time Due Date: 4pm

    B3 = Extension Date: 19/06/14 @ 4pm

    B1 = Arrival Date: 20/06/14
    B2 = Arrival Time: 3pm

    The item is 1 day late. So in the formula:

    Please Login or Register  to view this content.
    The bold and underlined part needs to happen AFTER a calculation has taken place to subtract B3 from B1/B2 to find out of it is still late.

    Here's a dropbox link for the file, unfortunately im having problems getting the website to load pages so i cant add the file

    https://dl.dropboxusercontent.com/u/...9/Overdue.xlsx
    Last edited by Barking_Mad; 06-19-2014 at 09:07 AM.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting the number of days overdue based on date and time

    Hi

    Perhaps to be my poor English..but i am not able to get the logic here.

    The result that you mentioned in your last post you can get it if you subtract the +1 condition in the formula. Altrough i feel that is not what you want.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    Fotis,

    No problems - it's hard for me to get my head round. You nearly cracked it however. I added a 1 in the second part as below and it works. I have no idea how though

    Please Login or Register  to view this content.
    Many thanks

  9. #9
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    Just to clear this up for anyone stumbling across this thread and needing this sort of thing but wondering how it works:

    You have:

    1. Item with a DUE delivery date (18/06/14)

    2. Item with a DUE delivery time (4:00pm) Note: Anything later than 4pm on the day of delivery or any subsequent date adds 1 day on to the day’s late total. In effect 4pm is being used as the end of the day instead of 12pm.

    3. You also have an ACTUAL delivery date: (19/06/14)

    4. An ACTUAL delivery time (4:01pm)

    In the above example:

    DAYS LATE = 2

    1 day between the DUE and ACTUAL date, and another day because it is past 4pm.

    This is then complicated by the fact an item may be granted an extension to its delivery date. This goes in a separate cell. When the item arrives the delivery date still gets entered, but to calculate if it is late or not, that has to be compared against the new extension date, not the original DUE date.

    You can use the example Fotis attached to see how this works, but replace the formula in E18 with the following:

    Please Login or Register  to view this content.

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Counting the number of days overdue based on date and time

    You are welcome and thanks for the feed back. Also thanks for the explanations!

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

  11. #11
    Registered User
    Join Date
    01-15-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Counting the number of days overdue based on date and time

    Hey, I am currently using this formula but I have a little problem, maybe it isn't a big problem or maybe I am missing something.

    So I am referencing this formula for: lets say A1, A2 and A3 so the formula is on cells B1, B2 and B3. It works perfectly but when I delete the cell reference I got numbers "41809" in that cell and it will not go away. Please help.

  12. #12
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    Hi - for Beany Baby and anyone else

    Sorry to bump this but it deserves an amendment as I was wrong about the above when i'd initially said it worked... I still dont have an answer.


    Thanks

  13. #13
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Counting the number of days overdue based on date and time

    Try

    =IF(B3<>"",INT((B1+B2)-(B3+A2)+1),INT((B1+B2)-(A1+A2)+1))

    41809 is the number of days after excel's zero date. Format the cell as a date and it will look OK.

    You could actually format a1 and b1 as date with hours and minutes and you could do away with a2 and b2 altogether.
    Click * below if this answer helped

  14. #14
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    Cracked it

    This is the correct answer as per Fotis's reply and download in #7.

    =IF($I14>C6,INT(($F14+$G14)-($I14+$F6))+1,INT(($F14+$G14)-($C6+$F6))+1)

  15. #15
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Counting the number of days overdue based on date and time

    I think Chris's works too albeit with different cell references.

+ 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. [SOLVED] Counting the number of days per month where where a job start time was after 10:00
    By Apache_sim in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-15-2013, 07:59 AM
  2. [SOLVED] Average number of days overdue, between date ranges
    By PJC2013 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2013, 03:01 PM
  3. Convert number of days to specific time & date
    By theperson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-19-2013, 11:44 AM
  4. Counting Days in Date/Time Format
    By ems.payroll in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2008, 04:19 PM
  5. [SOLVED] Counting the number of days between two date
    By Maddoktor in forum Excel General
    Replies: 1
    Last Post: 06-03-2005, 10:05 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