Dear User,
Good day!!
Apologies for the inconvenience caused and please don’t worry, let’s work together on your concern and move towards a resolution path.
As per the description shared, I understand you are looking for the formula to get the number of days based on the condition and generally you can achieve your requirement with the IF formula in the Calculated Column of SharePoint Online list. However, they are few things that need to be confirmed which will help us to give clear idea on your required output:
- Can I know the condition for getting the count of Date Started and TODAY? Is it when the task is not yet completed?
- If the task is completed, you want to count the days between Date Started and Date Completed?
- What’s the name of the Column that indicated whether the task is completed or not?
Note: If possible, please make a sample date with the required output (you can use Excel for reference data), where it will help us to better understand your requirement and provide you correct formula.
For example, if the name of column to show whether the task is completed or not is Status, then formula will be:
=IF([Status]=”Completed”, ([Date Completed – Date Started]), IF([Status]=”Not Closed”, DATEDIF([Date Started],TODAY(),”D”),””))
Note: The above formula is just an example.
Appreciate your patience and understanding. Have a great day!!
Best Regards,
Sophia