Calculating number of days a task is overdue
I am trying to calculate the number of days a tasks is overdue. If the task has been completed, I would like it to be blank or return a "0". Here is the formula that I have tried and it returns unparseable
=IF(AND([Finish Date]@row < TODAY(), % Complete@row = "100"), "0", IF(AND([Finish Date]@row >= TODAY(), OR(% Complete@row = "<100"), "+" + ABS(TODAY() - [Finish Date]@row), TODAY() - [Finish Date]@row))
Answers
-
=IF(AND([% Complete]@row <> 1, [Finish Date]@row < TODAY()), TODAY() - [Finish Date]@row, "")
- Make sure you have brackets around the % Complete if there is a space between % and Complete (in no space it does not matter: [% Complete]@row
- If the Finish Date cell is not populated you will get #INVALID OPERATION, you can fix this by placing IFERROR( after the = sign at the beginning and ,"" after the last parenthesis (see formula below):
=IFERROR(IF(AND([%Complete]@row <> 1, [Finish Date]@row < TODAY()), TODAY() - [Finish Date]@row, ""), "")
Let me know if this does not work.
Jason Miller
Smartsheet Developer, Consultant, & Solutions Engineer
(614) 571-9069
-
I made a change, and it is only returning a "0" even if the task is not completed
=IF(OR([Finish Date]@row < TODAY(), [% Complete]@row = "1"), "0", IF(AND([Finish Date]@row >= TODAY(), OR([% Complete]@row = "<1"), "+" + ABS(TODAY() - [Finish Date]@row), TODAY() - [Finish Date]@row)))
-
Still trying to get this to work Here is a screen shot of the sheet
here is the formula that is unparseable.
=IF(OR([% Complete]@row = 1), 0, IF(AND(OR([% Complete]@row = <1, ), [Due Date]@row > TODAY()), "+" + ABS(TODAY() - [Due Date]@row), TODAY() - [Due Date]@row))
-
Double check the column type is text (just to be safe). This simplified version should work, just copy and paste this in:
=IFERROR(IF(AND([% Complete]@row <> 1, [Due Date]@row < TODAY()), TODAY() - [Due Date]@row, ""), "")
The IFERROR statement should take care of the #UNPARSEBLE error, which may be happening if % Complete is blank. You can try changing it blanks to "0" if the IFERROR formula does not fix it.
Jason Miller
Smartsheet Developer, Consultant, & Solutions Engineer
(614) 571-9069
-
it is still calculating overdue days on completed tasks
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.1K Get Help
- 430 Global Discussions
- 149 Industry Talk
- 490 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 154 Just for fun
- 74 Community Job Board
- 499 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!