problem using custom duration with formula RRS feed

  • Question

  • Hi all,

    In my job I have to manage a number of repetitive tasks which total duration depends on the number of items (samples).


    • sample washing = 2min/sample
    • sample drying = 5min/sample
    • sample analysis = 6min/sample
    • ...

    For each task (experiment) these sub tasks are longer depending on the number of samples:

    i.e. experiment1 = 10 samples, experiment2 = 20 samples

    experiment 1

    • sample washing = 2min *10 =20min
    • sample drying = 5min *10 =50min
    • sample analysis = 6min *10 =60min


    • sample washing = 2min *20 =40min
    • sample drying = 5min *20 =100min
    • sample analysis = 6min *20 =120min

    I want to set up the gantt chart in a way that I can set up a new experiment just copying and pasting another one and edit the number of samples without calculating the duration of each subtask every time.

    ...what I did to set up this on a gantt chart:

    1. I created a custom duration (duration1) field for "single sample task-time"
    2. I created a custom number (number1) field for "sample number"
    3. I created a custom duration (duration2) field for "Total samples task-time"
    4. I created a custom finish (finish1) field for "end of the task for all the samples"

    ...then I set up the formula for:

    • duration2 = [Duration1]*[Number1]
    • finish1= ProjDateAdd([Start],[Duration2],[Task Calendar])


    1. Default Task Finish and Duration are not updated therefore they are not displayed correctly on the chart.
    2. If I select to show finish1 on the chart the bars on the chart appear the right length but they are completely misaligned (even if they have start2finish relationship) and mouseover shows default duration.

    What am I doing wrong?

    Why don't finish and finish1 have the same date? shouldn't ProjDateAdd([Start],[Duration2],[Task Calendar]) update automatically the default finish too?

    Why "task duration" doesn't update (stays on 8hours?)? Shouldn't it be the difference between start and finish?

    If you believe there is a better way to achieve what I need please let me know.

    Thanks in advance for the support!


    Tuesday, March 3, 2015 3:49 AM

All replies

  • Hi Michele,

    Quite a lot of questions, so let's take it from the beginning. The default start and finish (and duration) cannot be calculated based on other fields since they are automatically calculated by Project. But you can double click on the Gantt Chart and change the default task bar style to consider start1 and finish1 instead of start and finish. But note that the task dependencies (predecessors) consider the task start and finish, thus you cannot use your custom date to link yours tasks. See the picture below with a specific formating for start1/finish1, but also the inconsistency with the predecessor.

    It is important to understand that default duration, start and finish cannot be calculated out of the box (require VBA coding) and are not related with any formula including custom duration and dates.

    I don't see any easy way to achieve your goal: either do it manually or use some VBA code.

    Hope this helps,

    Guillaume Rouyre, MBA, MVP, P-Seller |

    Tuesday, March 3, 2015 8:18 AM