How do I calculate % of task's completion given start date, end date, and TODAY()

感情迁移 提交于 2019-12-21 16:49:39

问题


I have a gant with start date, end date, and % complete columns. By manually entering a number in the % column the bar representing the task gets shaded. What I want to do is instead of representing % completed, I want to show how much time is left before the end date from today.

      Start        End       % Time remaining from TODAY()
i.e. 12/01/2014   03/15/2015   (End date has not yet occurred)
     12/29/2014   12/29/2014   (Task was started and finished this day)

回答1:


Assuming your end date is in column B:

=IF(TODAY()>=B2,"Done",CONCATENATE(B2-TODAY(),""))

This will show you the number of days remaining. If you want the percentage of time spent, use

=IF(TODAY()>=B2,"Done",MAX((TODAY()-A2)/MAX(B2-A2,1),0))

and format the cell as a percentage.




回答2:


Here is a bit more succinct option it will show the percent completion as of the end of the current day.

=(MIN(TODAY(),B2)-A2+1)/(B2-A2+1)


来源:https://stackoverflow.com/questions/27968064/how-do-i-calculate-of-tasks-completion-given-start-date-end-date-and-today

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!