Custom field formulas are powerful: They allow a user to set the value of a field as a function of the value of other fields. For example, you might want a custom cost field to represent the budget allotted for the completion of a given task. This value would be hand-entered by the project manager. A second cost field contains a formula that defines its value as the budget field minus the task's Actual Cost field. This field would represent the Remaining Budget amount for the task.
You can also use formulas to create new calculated fields that did not exist before. For example, there is no Remaining Budget field, but the example on the next page discusses the creation of a Budget field and a Remaining Budget field using a formula.
Entering a Formula
Click Tools, Customize, Fields from the menu bar.
Select the field to which you want to add a formula.
Click the Formula button.
Enter the formula by hand here.
Use the Fields drop-down menu to choose from a list of fields to include in your formula.
Use the Function drop-down menu to select from a list of functions to use in your formula.
Click OK when you've entered a formula.
Entering the Remaining Budget Formula
Click Tools, Customize, Fields from the menu bar.
Rename a task Cost field to Budget and a second Cost field to Remaining Budget using the "Renaming a Field" task in this chapter.
Select the Remaining Budget field.
Click the Formula button.
Click on the Field drop-down menu and navigate to the Cost, Custom Cost, Budget field you just created above.
Enter a minus sign by typing it or by clicking the minus button.
Click on the Field drop-down menu and navigate to the Cost, Actual Cost entry, or type [Actual Cost] .
Click OK.
The Remaining Budget custom cost field will now equal the Budget field, minus the task Actual Work field.
Did You Know?
You may see the text #Error when using formulas . If you create a formula and your task or resource is lacking some of the data that the formula needs to calculate, you might see the text #ERROR . Do not be alarmed .
For Your Information
Experiment and Learn
Custom field formulas are difficult to fully explain. Experience and experimentation are the best ways to fully understand its power. Not every project or project manager will need to have formulas in their custom fields. However, it is a good idea to create a test project and play around with creating formulas for different fields.