On 4/2/07 4:01 PM, "Tom Elliott" <[EMAIL PROTECTED]> wrote in whole or in
part:

> At the risk of clogging up the list further, I shall correct myself:
> 
> FormatAsDollars ( Amount ; Precision ) =
> 
> Let ([
>        DollarsText = Int ( Amount ) ;
>        Cents = Abs (  10 ^ precision * Round ( Amount ; precision ) ) ;
>        CentsText = Right ( "000000000000" & Mod ( Cents ; 10 ^
> Precision ) ; Precision )
>       ] ;
>       "$" & DollarsText & "." & CentsText
>      )
> 
> cheers
> 
> Tom


I'd take the "$" out altogether and let the user supply in the calc:

"$" & FormatPrecision( number; precision )

that way the function is usable for more than just USD.

Beverly

Reply via email to