Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the result of expression evaluated in srcUnit as a string formatted according to format expressed in dstUnit.
FORMATEX(expression,"format",[srcUnit],[dstUnit],[langID][,calID])
expression A combination of constants, operators, functions, and references to ShapeSheet cells that results in a value.
format The format picture used to fomat the string.
srcUnit Optional. Units used to evaluate expression (in, cm, etc.).
dstUnit Optional. Units to use for the result of expression (in, cm, etc.).
langID Optional. The language used when formatting Microsoft Office System date/time pictures.
calID Optional. The calendar used when formatting Microsoft Office System date/time pictures.
Remarks
The type of the expression and the type specified in the format picture govern the behavior of the returned string. The format must be appropriate for the type of expression.
The srcUnit argument is used to scale untyped expression results, such as 3 + 4. If the result of expression has an explicit type, such as 3 ft + 8 ft, then srcUnit is ignored.
The dstUnit argument is used to specify the units used for the formatted result. If dstUnit is not specified, the units for the result of the expression are used.
Returns an error if the result of expression and the type expected in format are of a different kind, if there are syntax errors in format, or if it does not recognize the units passed as srcUnit or dstUnit.
Example
FORMATEX(5.5, "0.00 u", "cm", "ft")
Returns 0.18 feet.