Can you calculate the variance between dates in different tasks?

New Contributor

I'm trying to create a column that automatically calculates the variance between the finish date of one task and the start date of the next task. For example, one task ends on 10/04/2021 and the next task begins 09/24/2021. Is there a way to show that variance?

3 Replies
ktruesdell,
The answer to your question is "yes" but unfortunately, you can't get there from here with a custom field formula. Custom field formulas can only operate on data for that task or resource line (or limited Project level fields). In order to do what you want you'll need to use some VBA. I can help you with that if you'd like. Let me know.
John

@John-project Sure! I don't have any experience with VBA or anything like that. What can you do to help?

ktruesdell,
I can write a macro for you but I'll need to know the parameters for selection (i.e. how do you identify the tasks of interest and any other details).

I just re-read your post and it sounds a little funny. In your example you say one task ends on 10/24/21 and the "next" task begins 9/24/21. That would be a negative variance unless you're using a wayback machine. Maybe that was just a typo?

Would you be willing to share your file with me via e-mail? I find it easier to work one-on-one rather than potentially bogging down this thread with a back and forth. My address is below. I will ask some questions.
John
jmacprojataticlouddotdotcom
(remove obvious redundancies)
John