Formualizer Docs

DOLLARFR

Converts a decimal dollar value into fractional-dollar notation.

This is the inverse-style formatting helper used for quoted fractional price conventions.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=DOLLARFR(decimal_dollar, fraction)

Arguments

ArgumentTypeRequiredDefault
decimal_dollarnumberRequired—
fractionnumberRequired—

Remarks

  • fraction is truncated to an integer denominator and must be >= 1.
  • Sign convention: sign is preserved (-x maps to -result).
  • No periodic rate is involved in this conversion.
  • Fraction output is encoded by denominator digit width (ceil(log10(fraction))).

Error cases

  • Returns #NUM! when fraction < 1 after truncation.

Examples

Convert a dollar amount expressed with a 32-part fraction.

Formula =DOLLARFR(1.25,32)

Expected result 1.08

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use a negative dollar amount and a different fraction base.

Formula =DOLLARFR(-1.25,16)

Expected result -1.04

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Zero remains zero under the conversion.

Formula =DOLLARFR(0,32)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A zero fraction denominator cannot define the conversion.

Formula =DOLLARFR(1.25,0)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Express a decimal dollar quote in sixteenths.

Formula =DOLLARFR(1.125, 16)

Expected result 1.02

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Express the fractional portion of a negative dollar quote in thirty-seconds.

Formula =DOLLARFR(-3.46875, 32)

Expected result -3.15

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

How does DOLLARFR encode the fractional part?

It scales the numerator into decimal digits based on ceil(log10(fraction)), preserving the input sign.

Implementation

Engine source

On this page