Documentation/Calc Functions/DOLLARFR

From The Document Foundation Wiki
Jump to navigation Jump to search


Function name:

DOLLARFR

Category:

Financial Analysis

Summary:

Converts a quotation that has been given as a decimal number into a mixed decimal fraction.

Syntax:

DOLLARFR(DecimalDollar; Fraction)

Returns:

Returns a mixed decimal fraction.

Arguments:

DecimalDollar is a real number given as a decimal number or a reference to the cell containing that number.

Fraction is a positive whole number that is used as the denominator of the decimal fraction.

  • If Fraction is not an integer, then it will be truncated to an integer.
  • If after truncation Fraction is less than or equal to 0, then the function returns an error value. Alternatively, Fraction should be greater than or equal to 1.

Additional details:

  • The formula for DOLLARFR is:
Dollarfr.png

where Decimal is DecimalDollar and Denominator is Fraction.

Examples:

Formula Description Returns
=DOLLARFR(1.125;16) The function will converts a quotation that has been given as a decimal number into a mixed decimal fraction. Here, it stands for 1 and 2/16. 1.02
=DOLLARFR(1.125;8.2) The function will converts a quotation that has been given as a decimal number into a mixed decimal fraction. Here, it stands for 1 and 1/8 (8.2 is truncated to 8). 1.1
=DOLLARDE(-1.125;8.2) The function will converts a quotation that has been given as a decimal number into a mixed decimal fraction. Here, it stands for 1 and -1/8 (8.2 is truncated to 8). -1.1
=DOLLARFR(1.125;0.9) The function returns an error value since Fraction is less than 1. Err:502

Related LibreOffice functions:

DOLLARDE

TRUNC

ODF standard:

Section 6.12.17, part 2

Equivalent Excel functions:

DOLLARFR