Forum Discussion

ktruesdell's avatar
ktruesdell
Copper Contributor
Sep 13, 2022

Can you calculate the variance between dates in different tasks?

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?

  • John-project's avatar
    John-project
    Silver Contributor
    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
    • ktruesdell's avatar
      ktruesdell
      Copper Contributor

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

      • John-project's avatar
        John-project
        Silver Contributor
        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

Resources