Returns an Integer representing the character code that corresponds to the first letter in a string.Ĭoerces an expression to data type Boolean.Įxpression Any valid string or numeric expression.Ĭoerces an expression to data type Currency.Įxpression Any numeric expression from -922,337,203,685,477.5808 to 922,337,203,685,477.5807.Ĭoerces an expression to data type Double.Įxpression Any numeric expression from -1.79769313486232E308 to -4.94065645841247E-324 for negative values 4.94065645841247E-324 to 1.79769313486232E308 for positive values.Ĭoerces an expression to data type Decimal.Įxpression Any numeric expression from +/-79,228,162,514,264,337,593,543,950,335 for zero-scaled numbers, that is, numbers with no decimal places. The CStr function in the above formula works only if the field is defined. When added to a custom text field, the following formula returns a value of "No baseline," "Overbudget by 20% or more," or "Under budget": Switch(Len(CStr())1.2,"Overbudget by 20% or more", (+1)/(+1)>1, "Overbudget",True,"Under budget") When added to a custom number field, the following formula returns a numerical value that indicates the number of days between the current date and the finish date of the tasks in your schedule: The following examples illustrate how you can use formulas with custom fields:
Formulas enable you to work with fields to create these new values.
When you use Microsoft Project, you might need to work with values that do not reside directly in fields. In the Custom Fields dialog box, click Formula. For Project 2010, click the Project tab, and in the Properties group, click Custom Fields. Tip: To enter a formula into a custom field for Project 2007, on the Tools menu, point to Customize, and then click Fields.