Hi,
We all should have been more explicit.
The reason some of the "solutions" offered work and others don't is that
Project KEEPS durations in minutes, but inDuration columns SHOWS them as
whatever you like (default days). So when you use any formula, the values in
there are inevitably in minutes.
So let's say you have a duration variance of 2,25 days or 600 minutes.
When your formula is Round([Duration Variance]) it is calculated to 600
(which is round so cannot be rounded) and displayed again a 2,25
The only solution thus consists of dividing duration variance by 480 (or to
be more precise, should you have a day definition other than 8 hours, by
Minutes Per Day, a value to be found under Field, Project, Number) and round
the result.
That works perfectly when you put iy IN A NUMBER FIELD because a number
foeld will not try to display it in any other unit than what is calculated.
The value shown will be 2.
However, in a duration field, Project will convert this value of 2
(remember, if it's duration, it is interpreted as minutes) into days and
show you 0 because rounded at 2 decimals it's les than 0,01.
So if you want the result in a duration field you have to do the conversion
the other way around again and the formula will be:
[Minutes Per Day]*Round([Duration Variance]/[Minutes Per Day])
That's it..
Greetings,
--
Jan De Messemaeker, Microsoft Project Most Valuable Professional
http://users.online.be/prom-ade/
For FAQs:
http://www.mvps.org/project/faqs.htm
Scott D said:
First ya'll are quick to respond, I appreciate the help.
But, its still not working (for me).
Fix and Int aren't producing any change at all, my days are still going out
to a decimal place.
Round([Duration Variance]/[Minutes Per Day]) divides my days by 480 and
reduces them to fractions of days unless the task exceeds 480 days.
Text1 = Round([Duration Variance]/480) yields "0 days" in all tasks.
I've tried Round([Duration Variance]) and I get not change, I've tried
placing a comma and a zero or a whole number after [Duration Variance], like
you would in a spreadsheet and nothing changes. Could there be something in
the customization of the project that needs to be checked? If you haven't
notice by now, I'm still new at using this program.
--
And they said this would be easy
Scott D said:
I am trying to create a custom field that will round up or just simply round
off the duration of the tasks. I've found the syntax for the round function,
Rnd(number), I've tried the following syntax scenarios Rnd(Duration) which
yields "0 days". What I want to use is Duration Variance but it will not
allow the following syntax, Rnd(Duration Variance) I get a message that tells
me the syntax is wrong. I've tried Rnd("Duration Variance") and it yields
#ERROR. I've tried Rnd([Duration Variance]) and it yields "0 days". What do
I need to do to the field name to make it work?