Sue, Jason (and anybody else who cares)

I think I've got it now, but am prepared to be corrected

FormatAsDollars ( Amount ; Precision ) =

Let ([
      DollarsText = Int ( Amount ) ;
      Cents = Abs (  10 ^ precision * Round ( Amount ; precision ) ) ;
CentsText = Right ( "000000000000" & Int ( Mod ( Cents ; 10 ^ Precision ) ) ; Precision )
     ] ;
     "$" & DollarsText & "." & CentsText
    )

cheers

Tom

Reply via email to