+ Reply to Thread
Results 1 to 13 of 13

Date Calculation for Number of Days Overdue

  1. #1
    Registered User
    Join Date
    11-30-2007
    Location
    Lancashire, UK
    MS-Off Ver
    1908
    Posts
    62

    Arrow Date Calculation for Number of Days Overdue

    Hi all,

    I am trying to write up a formula that will give me the number of days overdue a date is from todays date

    So I have a due date in column A and todays date in column B with another column C for Days Overdue

    What would that formula be that will calculate the number of days overdue from the due date from todays date and display the number of days overdue in C column

    Some tasks with due date are not overdue yet so how can I include this to show as a possible minus number before becomming overdue?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Calculation for Number of Days Overdue

    When you say "todays date in column B" is this a manually entered date, that will (could) be different for each row, or is it actually today's date? (not that it really matters, just curious - if it is =TODAY(), I suggest you put it in 1 cell and then just reference it, rather than having a while column of =TODAY() )

    The formula should be pretty simple. Something like...
    =if(A2<B2,B2-A2,A2-B2)
    or you could get a bit more fancy with something like this...
    =if(A2<B2,B2-A2&" Days Overdue",A2-B2&" Days until Overdue")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-24-2014
    Location
    North East England
    MS-Off Ver
    Pro Plus ver 10
    Posts
    34

    Re: Date Calculation for Number of Days Overdue

    I was going to suggest somethintg similar there;

    =Today() in A1 then in the overdue column =A1-C2

    but I'm a rank amateur!

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Date Calculation for Number of Days Overdue

    Quote Originally Posted by FDibbins View Post
    When you say "todays date in column B" is this a manually entered date, that will (could) be different for each row, or is it actually today's date? (not that it really matters, just curious - if it is =TODAY(), I suggest you put it in 1 cell and then just reference it, rather than having a while column of =TODAY() )

    The formula should be pretty simple. Something like...
    =if(A2<B2,B2-A2,A2-B2)
    or you could get a bit more fancy with something like this...
    =if(A2<B2,B2-A2&" Days Overdue",A2-B2&" Days until Overdue")
    Very good idea which will avoid much of the volatility of the TODAY() function

  5. #5
    Registered User
    Join Date
    11-30-2007
    Location
    Lancashire, UK
    MS-Off Ver
    1908
    Posts
    62

    Re: Date Calculation for Number of Days Overdue

    Hi all,

    I have attached an example of what I am trying to achieve

    M1 is my =+TODAY()
    L3 and L4 are my target dates
    I now want to calculate overdue days from and show those in M3 etc
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-24-2014
    Location
    North East England
    MS-Off Ver
    Pro Plus ver 10
    Posts
    34

    Re: Date Calculation for Number of Days Overdue

    =SUM($M$1-L3)

    in M3 shows days remaining; is that what you mean?

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Date Calculation for Number of Days Overdue

    Quote Originally Posted by Pepe Le Mokko View Post
    ......which will avoid much of the volatility of the TODAY() function
    Not according to Charles Williams (Decision Models) - on his site he describes how volatile functions work. This is one part

    Direct dependents of volatile functions are always recalculated:
    If A1 contains =NOW() and A2 contains =A1 and A3 contains =A2 then both A2 and A3 will be recalculated at each recalculation.
    see the link
    Audere est facere

  8. #8
    Registered User
    Join Date
    11-30-2007
    Location
    Lancashire, UK
    MS-Off Ver
    1908
    Posts
    62

    Re: Date Calculation for Number of Days Overdue

    Dabooka that is what I am looking for, how can I add a format now to change the over due day numbers to RED

  9. #9
    Registered User
    Join Date
    11-30-2007
    Location
    Lancashire, UK
    MS-Off Ver
    1908
    Posts
    62

    Re: Date Calculation for Number of Days Overdue

    Managed to sort the coulour out, thansk guys your all stars!!

  10. #10
    Registered User
    Join Date
    10-24-2014
    Location
    North East England
    MS-Off Ver
    Pro Plus ver 10
    Posts
    34

    Re: Date Calculation for Number of Days Overdue

    Quote Originally Posted by Sharr76 View Post
    Dabooka that is what I am looking for, how can I add a format now to change the over due day numbers to RED
    Conditonal formatting is your friend there

    Highlight your column (if you want it down the entire column otherwise just the cells), select Conditional Formatting, select New Rule

    - "Format only cells that contain"
    - Format only cells with : Cell value / greater than / 0 (that assumes you only want red if it is a day over)
    - Set format (here choose your text style and colour)
    - Click okay

    That should do it. The top two text cells will then appear red, just highlight those and delete the rule.

    Bear in mind at the minute you have it set up so the countdown is a negative value and when it's overdue it becomes a positive number. Personally I would change the cell title to "Days Until Overdue" and then swap the formula I suggested earlier around to =SUM(L3-$M$1). That will then read positive value until day zero, then negative aftwards once it's O/D

    To me it just looks more obvious that the numbers are then overdue, what with a - sign and in red.

    HTH
    Last edited by Dabooka; 10-24-2014 at 10:15 AM. Reason: Typos

  11. #11
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Date Calculation for Number of Days Overdue

    Quote Originally Posted by Dabooka View Post
    =SUM($M$1-L3)

    in M3 shows days remaining; is that what you mean?
    BTW the SUM function is unnecessary

  12. #12
    Registered User
    Join Date
    02-05-2021
    Location
    Australia
    MS-Off Ver
    360
    Posts
    1

    Re: Date Calculation for Number of Days Overdue

    Quote Originally Posted by FDibbins View Post
    When you say "todays date in column B" is this a manually entered date, that will (could) be different for each row, or is it actually today's date? (not that it really matters, just curious - if it is =TODAY(), I suggest you put it in 1 cell and then just reference it, rather than having a while column of =TODAY() )

    The formula should be pretty simple. Something like...
    =if(A2<B2,B2-A2,A2-B2)
    or you could get a bit more fancy with something like this...
    =if(A2<B2,B2-A2&" Days Overdue",A2-B2&" Days until Overdue")

    How do you change this to whole days? everything I do does not work.

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Date Calculation for Number of Days Overdue

    Quote Originally Posted by jo83au View Post
    How do you change this to whole days? everything I do does not work.
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

+ 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 overdue based on date and time
    By Barking_Mad in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-08-2014, 10:57 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. number of days from date to date calculation
    By IvicaOS in forum Excel General
    Replies: 2
    Last Post: 12-06-2010, 04:09 PM
  4. Days Overdue Column
    By Frank Sellin in forum Excel General
    Replies: 3
    Last Post: 09-13-2010, 11:32 AM
  5. Replies: 3
    Last Post: 07-12-2010, 09:09 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