Get Your Numbers Right



Returns the fractional portion of a decimal non-integer, with up to 32,767 significant digits of precision.



num Required. The decimal number for which to return the fractional portion.
as_int Optional. Set to TRUE to return fractional portion as an integer (without a decimal). FALSE by default.
sign Optional. Determines whether the sign of the return value is positive or negative. 1 by default.

sign value

1 Return value takes the sign of num (Default)
2 Return value is always positive.
3 Return value is always negative.
format_negative Optional. Determines whether negatives are formatted with a leading hyphen ("-"), or parentheses ("()"). Set to 1 to format negatives with a leading hyphen. Set to 2 for parentheses. 1 by default.

You can also format negatives with a red font.

format_thousands Optional. Determines whether thousands separators are included. Set to TRUE to include thousands separators. FALSE by default.
format_currency Optional. Determines whether currency symbol is included. Set to TRUE to include currency symbol. The currency symbol will be added either to the beginning or to the end of the result, whichever is appropriate for the locale. FALSE by default.
exponential_notation Optional. Determines whether result is formatted in exponential notation. Set to TRUE to format in exponential notation. FALSE by default.
maximum_significant_digits Optional. Determines the maximum number of significant digits to be returned. Default is 100, or the user's custom maximum set in the About box, or the maximum number allowed by the edition of xlPrecision, whichever is less.



Formula Description Result
=xlpFRAC(1.5) Fractional portion of 1.5 0.5
=xlpFRAC(1.5,TRUE) Fractional portion of 1.5, as an integer 5
=xlpFRAC(-1.5) Fractional portion of -1.5 -0.5
=xlpFRAC(-1.5,,2) Fractional portion of -1.5, made positive 0.5
=xlpFRAC(-1.5,TRUE,2) Fractional portion of -1.5, as an integer, made positive 5

See Also