Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CY Function
Collapse the table of content
Expand the table of content

CY Function

Last modified: June 17, 2011

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2
Example 3
Example 4

Returns a currency value.

CY(value, cyID)

Parameters

Name

Required/Optional

Data Type

Description

value

Optional

Number or String

A number or a string that includes currency-specific formatting. If not specified, the currency value is formatted according to the currency style in the system's Region and Language settings.

cyID

Optional

Number

A numeric currency ID or a three-character quoted string for the ISO 4217 abbreviation.

To specify a different currency, you must include a valid cyID. For a list, see About currency constants.

If value is incompatible with the designated currency type, or if an invalid argument such as "not a number" is specified, a #VALUE! error is returned. If value is greater than 922,337,203,685,477.5807 or less than -922,337,203,685,477.5808, a #VALUE! error is returned.

For better precision with very large currency values that include fractions of a unit, such as 3.6 trillion, use string arguments for value.

Specifying an invalid cyID returns an error.

If the user's Region and Language settings specify United States dollars:

CY(999998.993)

Returns $999,998.99

CY(12345678.993, "USD")

Returns $12,345,678.99

CY(12345678.993, "DEM")

Returns 12,345,678.99 DEM

CY(12345678.7832, "XXX")

Returns 12,345,678.78

Show:
© 2015 Microsoft