+ Reply to Thread
Results 1 to 9 of 9

Formula to calculate days overdue depending on the status

  1. #1
    Registered User
    Join Date
    11-24-2020
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Question Formula to calculate days overdue depending on the status

    Hi,

    I need a formula that calculates how many days an Opened or Completed task is overdue from the target date
    I would rather that any Signed Off tasks would remain blank in the Past Target Date column

    I have tried using if formulas but can't seem to get it right

    Can anyone help me out? Thanks in advance!
    Attached Files Attached Files

  2. #2
    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,007

    Re: Formula to calculate days overdue depending on the status

    Try

    =IF(OR(([@Status]="Opened"),[@Status]="Completed"),MAX(0,[@[Status Closed Date]]-[@[Target Date]]),"")

    will return 0 if within Target Date.

  3. #3
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    896

    Re: Formula to calculate days overdue depending on the status

    So are you wanting the past due days to be calculated from todays date or the status closed date column? AND only display those number of days if Open or completed?
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  4. #4
    Registered User
    Join Date
    11-24-2020
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Formula to calculate days overdue depending on the status

    I am looking for the past dues days to be calculated from todays date. I need to know from today how many days the Open and Completed records are past the Target Date

    And if possible have a little bit of text at the end so it says, for example, 20 days past Target Date

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,412

    Re: Formula to calculate days overdue depending on the status

    Not sure what you want to display negative value (not past target date), there are multi option:

    * Negative display:
    =IF(A7="Signed Off","",E7-C7&" days "&$F$6)

    * Blank for not past:
    =IF(OR(A7="Signed Off",E7-C7<0),"",E7-C7&" days "&$F$6)

    In case you want to count from today's date:
    =IF(OR(A7="Signed Off",TODAY()-C7<0),"",TODAY()-C7&" days "&$F$6)
    Quang PT

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

    Re: Formula to calculate days overdue depending on the status

    If they are COMPLETED the (TARGET) can never be past TODAY.

    For Completed you need to compare CLOSED vs TARGET. If they are still OPEN(ed) then compare TARGET vs TODAY

    ??

  7. #7
    Registered User
    Join Date
    11-24-2020
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Formula to calculate days overdue depending on the status

    Quote Originally Posted by JohnTopley View Post
    If they are COMPLETED the (TARGET) can never be past TODAY.

    For Completed you need to compare CLOSED vs TARGET. If they are still OPEN(ed) then compare TARGET vs TODAY

    ??
    Not completely sure what you mean here, if you're commenting on the status's?
    They have different meanings for this particular sheet so Opened and Completed both need past due dates calculations

  8. #8
    Registered User
    Join Date
    11-24-2020
    Location
    UK
    MS-Off Ver
    2010
    Posts
    5

    Re: Formula to calculate days overdue depending on the status

    Quote Originally Posted by bebo021999 View Post
    Not sure what you want to display negative value (not past target date), there are multi option:

    * Negative display:
    =IF(A7="Signed Off","",E7-C7&" days "&$F$6)

    * Blank for not past:
    =IF(OR(A7="Signed Off",E7-C7<0),"",E7-C7&" days "&$F$6)

    In case you want to count from today's date:
    =IF(OR(A7="Signed Off",TODAY()-C7<0),"",TODAY()-C7&" days "&$F$6)
    This is perfect thank you!

    Ended up using this formula =IF(OR(A7="Signed Off",TODAY()-C7<0),"",TODAY()-C7&" days "&$F$6)

    Thank you very much

  9. #9
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    896

    Re: Formula to calculate days overdue depending on the status

    Here is a formula that will work as well

    =IFS([@Status]="Opened",DATEDIF(C7,$C$5,"d") & " Days Past Target Date",[@Status]="Completed",DATEDIF(C7,$C$5,"d") & " Days Past Target Date")

    Attached is your sample with the above added and working.
    Attached Files Attached Files

+ 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] Calculate which item is most overdue, or list items by most overdue
    By RD_Jones in forum Excel General
    Replies: 8
    Last Post: 05-11-2021, 12:41 PM
  2. Days remaining/overdue formula
    By reilsc in forum Excel General
    Replies: 4
    Last Post: 10-19-2020, 09:56 AM
  3. Replies: 7
    Last Post: 02-02-2017, 02:41 PM
  4. Excel 2010 - Formula for days overdue HELP!
    By banks14 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-20-2014, 02:31 PM
  5. Formula to count days overdue 5, 10, 15, 20, 25, 30, 60, 90+
    By clintwade in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-30-2013, 10:37 AM
  6. Replies: 4
    Last Post: 03-20-2013, 05:50 AM
  7. [SOLVED] Formula for Days Overdue if not Completed
    By excelnewb02 in forum Excel General
    Replies: 5
    Last Post: 09-11-2012, 04:51 AM

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