Rnd Function in Custom Field

Microsoft Project

    Sponsored Links

    Next

  • 1. Link OR Import Calendar from MS Project
    I want to create a calendar in MS Project. Then I also have a database in MS Access. ANd here I would like to show individual's work schedule (being created in MS Project for each individual). Do you think this is the best way of doing it? If not then how can I do it. I really need your help on this. Your response is highly appreciated. Thanks
  • 2. Grouped view of projects and tasks
    I have an Enterprise Outline Code (text, 1-level only) that specifies the type of a project (e.g. Maintenance, Training, R&D, Internal etc.). I want to be able to produce (either in Project Professional or Project Web Access) a grouped view of all current projects. Meaning that I want something like a master project where the top level contains 1 entry for each type of project; then I want to be able to expand each entry to show all projects of that type, and then expand each project to show its tasks etc. I mainly need this so that I can look at monthly progress information for all projects, or for all projects of a certain type, or for a single project etc. all in one view. I've tried creating a master project and using the "Group by" feature. This does group entries by project type, but doesn't produce the structure described above; instead, tasks and summary tasks (i.e. project entries) just get mixed up and the hierarchy is lost. I've also tried creating a Portfolio Analyzer view, but my custom Enterprise Outline Code doesn't appear in the Fields list; also, if I put the "Projects" field in the Row area, then all I get is the data for each Project (i.e. I can't expand to get data for each task) and there doesn't seem to be a "Tasks" field. Any help or advice would be greatly appreciated. Best regards, Constantinos Symeonides
  • 3. Resource allocation within a subset
    I'm trying to level my project from a specific start date based on work effort. This works fine at the same category level, but different resources assigned to independent tasks within a category look as if the second task is dependent on the first. The 2nd task date does not start until the first task is complete. There is no predecessor. How can I get both tasks to start at the same time, for instance? Suggestions, please. Thanks, Michelle
  • 4. Working back from Finish Date
    I have a project on which I have set the Finish Date and I need to work backwards. None of the FS, SS, FF, or SF seem to work. Do I have to use negative dates? How do you do this?
  • 5. Printed views are missing data.
    Printing from Project 2003 on XP Pro Operating system, to HP DesignJet 500 Plotter Since upgrading to Project 2003 my printouts have been missing data. My Gantt chart view is set to display solid blue bars with the work hours and the resource names shown on or after the bar. This data displays correctly in the Gantt chart view. However, when I go to print preview, (and when I print the view), the text data is missing from the bars for about the bottom 25% of the tasks Also, in the resource usage view, I like to roll up the resources so that only the total assigned hours for each person are shown. This displays correctly on the screen, but when I go to print preview, (and when I print the view), the last three weeks of each page are shown with no data.

Rnd Function in Custom Field

Postby U2NvdHQgRA » Wed, 12 Jul 2006 02:06:02 GMT

I am trying to create a custom field that will round up or just simply round 
off the duration of the tasks.  Ie 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.  Ie tried Rnd("Duration Variance") and it yields 
#ERROR.  Ie tried Rnd([Duration Variance]) and it yields  days  What do 
I need to do to the field name to make it work?
-- 
And they said this would be easy

Re: Rnd Function in Custom Field

Postby Jan De Messemaeker » Wed, 12 Jul 2006 02:35:56 GMT

Hi,

Rnd is the function that generates a random number beween 0 and 1.
Better use Fix or Int.



Re: Rnd Function in Custom Field

Postby Um9nZXI » Wed, 12 Jul 2006 05:15:02 GMT

Try: Round([Duration Variance]/[Minutes Per Day])






Re: Rnd Function in Custom Field

Postby Jan De Messemaeker » Wed, 12 Jul 2006 05:42:12 GMT

Hi,

I can't find Round in the MS project custom field function list, nor in the
help.
The urprising thing is: it works.



Re: Rnd Function in Custom Field

Postby John » Wed, 12 Jul 2006 06:10:27 GMT

In article < XXXX@XXXXX.COM >,




Scott,
A couple of added comments. If you are using a spare duration field for 
your custom field, the Fix or Int functions will not work. I'm not sure 
why but they just don't - it may have something to do with the 
formatting applied to spare duration fields. A spare text field will 
work fine although you will need to apply a factor if for example you 
want the value in days, (Project stores all time related information in 
minutes, so to convert to days a factor of 490 must be used).

If you really want a rounded value instead of a truncated value, use the 
rounding function. It is not listed as being available for custom field 
formulas, but it will work. The syntax is:
Text1 = Round([Duration Variance]/480)

Hope this helps,
John
Project MVP


RE: Rnd Function in Custom Field

Postby U2NvdHQgRA » Thu, 13 Jul 2006 06:17:02 GMT

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





> #ERROR.  Ie tried Rnd([Duration Variance]) and it yields  days  What do >
> I need to do to the field name to make it work?>
> -- >
> And they said this would be easy

Re: Rnd Function in Custom Field

Postby Jan De Messemaeker » Thu, 13 Jul 2006 15:56:37 GMT

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,



Re: Rnd Function in Custom Field

Postby U2NvdHQgRA » Thu, 13 Jul 2006 23:53:01 GMT

an

Thanks for simplifying it for me. It worked exactly like I wanted it to.
I've got to quit treating the functions as if I were in a spreadsheet.

Scott
--
And they said this would be easy


"Jan De Messemaeker" wrote:


Re: Rnd Function in Custom Field

Postby Jan De Messemaeker » Fri, 14 Jul 2006 00:42:02 GMT

Hi Scott,

You're welcome.
And I doin't know whether easy is the word, but by all means

- it is NOT a spreadsheet indeed
- and it is rarely "intuitive"

Greetz,



Similar Threads:

1.Adding a function into Custom Field, Formula

2.Switch Function for Custom Field Formulas

I am attenpting to use 

switch(expr1, value1, expr2, value2, expr3, value3)

After entering 14 expr/value pairs I receive a syntax 
error.  Does anyone know if there is an upper limit on 
the number of expr/value pairs that can be entered into a 
switch statement?

Thanks.

Marian

3.#ERROR message for custom field function - Bizarre!

I hope someone can help me understand this bizarre problem with a project 
plan that I've been using and evolving for the past 1 1/2 years to track a 
number of projects on a very high level (Project Portfolio Reporting):

All of a sudden my custom field functions no longer work - even a simple 
Today = Now() function.  It results in "#ERROR" being displayed.  I checked 
to make sure that I did not remove any necessary custom fields, tables, etc. 
that are used by other calculations. (All looks good)  I confirmed that I 
have the auto-calculate value set under Tools -> Opotions-> Calculation mode. 
 I pushed the F9 key just in case as well. If I create a band new project and 
I test the "Now()" function in a custom field it works great.  

THEN I stumbled onto a fix by adding a bogus new task to my existing file 
and all of a sudden everything recalculated and the function returned the 
proper value???  Can anyone tell me what is going on??  It is as if MS 
Project decided to do a 'recalculate' with this new task I added and then all 
is good.  

Please help me understand what is going on!
Thank you SO much!

4.project functions for custom fields

I'm trying to use project functions for custom fields. in particular the 
'format' function. I'm having a hard time finding documentation on what the 
various options/commands available are and how to use.

help?

5.Custom Ent Fields - Functions

I've defined a project status field with an associated pick list. In my view however, I want to replace the single numeric value with the descriptive field. What function is best for doing this?

Examples: 1=Pre-approval; 2=Approved; 3=Complet

6. Using Task IDs in Custom Field Functions

7. Custom functions for customised field formulae

8. Aggregate functions (min, sum) in Custom Project Fields



Return to Microsoft Project

 

Who is online

Users browsing this forum: No registered users and 7 guest