问题
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