From: G�rard Ducouret on
Benedykt,
I think to only way to do that is using a VBA procedure which will calculate
the duration and write it down in the Duration column
G�rard Ducouret

"Benedykt" <psobolewski(a)fiokware.com> a �crit dans le message de news:
2d41514b-c795-47f3-8786-143152f5e4a2(a)g19g2000yqe.googlegroups.com...
On Mar 10, 5:24 pm, John <mjen...(a)theriver.com> wrote:

> Rob already answered your post but what exactly are you trying to do?
> Very likely there is another approach and perhaps we can be of help.

For instance I want to calculate duration of tasks. I want to not
enter them manually, but to calculate them from some non standard
columns. So far I do it by calculating calculated duration in some non
standard column and then copying it as a link to a standard "duration"
column - but I'd like to do it smarter way.



From: Rob Schneider on
You should write a VBA macro that implements your algorithm, taking info
from the other standard and custom fields. Then save that result into
the Duration fields (all in the macro).


--rms

www.rmschneider.com




On 11/03/10 05:55, Benedykt wrote:
> On Mar 10, 5:24 pm, John<mjen...(a)theriver.com> wrote:
>
>> Rob already answered your post but what exactly are you trying to do?
>> Very likely there is another approach and perhaps we can be of help.
>
> For instance I want to calculate duration of tasks. I want to not
> enter them manually, but to calculate them from some non standard
> columns. So far I do it by calculating calculated duration in some non
> standard column and then copying it as a link to a standard "duration"
> column - but I'd like to do it smarter way.
>
From: John on
Agree with all the other answers, however, you can do what you want in
another way:

Say you want MSP to automatically calculate the duration based on a
quantity (e.g. Number1) and a unit rate (e.g. Number2). Now make a
formula for Duration1 being "Number1*Number2/480" (if 8 hrs/day). Copy
Duration1 and now Paste Special - Paste Link - Text Data into the cell
of the Duration (have to be done for each activity where relevant).
Your duration, start/finish dates and bar on Gantt chart will now
change automatically when you change quantity and/or unit rate.

If you want to include resources just modify your formula with e.g.
Number3 being the numbers of resources assigned to the activity.

Similar approach can be done for start date, e.g. by paste special -
paste link from Start1 and so on for other standard columns.

Regards,

John

From: John on
Sorry Benedykt,

I didn't read your 2nd post. You already got the answer yourself.

Regards,

John
From: John on
In article
<2d41514b-c795-47f3-8786-143152f5e4a2(a)g19g2000yqe.googlegroups.com>,
Benedykt <psobolewski(a)fiokware.com> wrote:

> On Mar 10, 5:24�pm, John <mjen...(a)theriver.com> wrote:
>
> > Rob already answered your post but what exactly are you trying to do?
> > Very likely there is another approach and perhaps we can be of help.
>
> For instance I want to calculate duration of tasks. I want to not
> enter them manually, but to calculate them from some non standard
> columns. So far I do it by calculating calculated duration in some non
> standard column and then copying it as a link to a standard "duration"
> column - but I'd like to do it smarter way.

Benedykt,
Although the other John did offer another option (i.e. using Paste
Special), and you also mentioned that you are using that approach now, I
don't recommend it. Paste links are fragile and if not handled with
great care, even within a given project file, can lead to corruption. I
have to go with Rob and Gerard, in your case VBA is the better way to
go. If you need help with a VBA solution, give us the details (i.e.
fields you are using for the non-standard data and calculation formula),
and we can probably help.

Keep in mind that the Duration field is calculated by Project using the
work equation:
Duration = Work / (Hours Per Day x Units)
A little more explanation as to why you want to manually calculate
duration would helpful. Maybe you are trying to do something that
Project just isn't designed to do.

John
Project MVP